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
15
16namespace OpenMS
17{
18
19class KDTreeFeatureMaps;
20
31class OPENMS_DLLAPI KDTreeFeatureNode
32{
33
34public:
35
43
46
49
52
54 typedef double value_type;
55
58
60 Size getIndex() const;
61
62protected:
63
66
69
70private:
71
74
75};
76
77}
78
Pools features from multiple maps into a single 2D kd-tree on (RT, m/z) for fast range queries.
Definition KDTreeFeatureMaps.h:51
Lightweight kd-tree entry: a back-pointer to a KDTreeFeatureMaps and the index of one feature in it.
Definition KDTreeFeatureNode.h:32
KDTreeFeatureNode(KDTreeFeatureMaps *data, Size idx)
Create a node referencing one feature inside data.
Size idx_
Index of this feature.
Definition KDTreeFeatureNode.h:68
Size getIndex() const
Global index of the referenced feature inside the parent KDTreeFeatureMaps.
KDTreeFeatureNode(const KDTreeFeatureNode &rhs)
Copy constructor - copies the back-pointer; the wrapped data object is shared.
KDTreeFeatureMaps * data_
Pointer to the actual data.
Definition KDTreeFeatureNode.h:65
KDTreeFeatureNode & operator=(KDTreeFeatureNode const &rhs)
Assignment operator - copies the back-pointer; the wrapped data object is shared.
value_type operator[](Size i) const
2D coordinate accessor used by libkdtree++: [0] returns RT, [1] returns m/z (both forwarded to the pa...
double value_type
libkdtree++ requires this typedef on the value type
Definition KDTreeFeatureNode.h:54
KDTreeFeatureNode()
Default constructor is not supposed to be called.
virtual ~KDTreeFeatureNode()
Destructor (does not delete the wrapped data)
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