OpenMS
Loading...
Searching...
No Matches
KDTreeFeatureNode.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Johannes Veit $
6// $Authors: Johannes Veit $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
16
17namespace OpenMS
18{
19
20class KDTreeFeatureMaps;
21
23class OPENMS_DLLAPI KDTreeFeatureNode
24{
25
26public:
27
30
33
36
39
41 typedef double value_type;
42
45
47 Size getIndex() const;
48
49protected:
50
53
56
57private:
58
61
62};
63
64}
65
Stores a set of features, together with a 2D tree for fast search.
Definition KDTreeFeatureMaps.h:24
A node of the kD-tree with pointer to corresponding data and index.
Definition KDTreeFeatureNode.h:24
KDTreeFeatureNode(KDTreeFeatureMaps *data, Size idx)
Constructor.
Size idx_
Index of this feature.
Definition KDTreeFeatureNode.h:55
Size getIndex() const
Return index of corresponding feature in data_.
KDTreeFeatureNode(const KDTreeFeatureNode &rhs)
Copy constructor - copy the pointer, use same data object.
KDTreeFeatureMaps * data_
Pointer to the actual data.
Definition KDTreeFeatureNode.h:52
KDTreeFeatureNode & operator=(KDTreeFeatureNode const &rhs)
Assignment operator - copy the pointer, use same data object.
value_type operator[](Size i) const
Needed for 2D range queries using libkdtree++. [0] returns RT, [1] m/z.
double value_type
libkdtree++ needs this typedef
Definition KDTreeFeatureNode.h:41
KDTreeFeatureNode()
Default constructor is not supposed to be called.
virtual ~KDTreeFeatureNode()
Destructor.
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19