OpenMS
KDTreeFeatureNode.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- 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 
13 #include <OpenMS/CONCEPT/Types.h>
15 #include <OpenMS/CONCEPT/Macros.h>
16 
17 namespace OpenMS
18 {
19 
20 class KDTreeFeatureMaps;
21 
23 class OPENMS_DLLAPI KDTreeFeatureNode
24 {
25 
26 public:
27 
30 
33 
36 
38  virtual ~KDTreeFeatureNode();
39 
41  typedef double value_type;
42 
45 
47  Size getIndex() const;
48 
49 protected:
50 
53 
56 
57 private:
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
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.
KDTreeFeatureNode & operator=(KDTreeFeatureNode const &rhs)
Assignment operator - copy the pointer, use same data object.
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