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
32class OPENMS_DLLAPI KDTreeFeatureNode
33{
34
35public:
36
44
47
50
53
55 typedef double value_type;
56
59
61 Size getIndex() const;
62
63protected:
64
67
70
71private:
72
75
76};
77
78}
79
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:33
KDTreeFeatureNode(KDTreeFeatureMaps *data, Size idx)
Create a node referencing one feature inside data.
Size idx_
Index of this feature.
Definition KDTreeFeatureNode.h:69
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:66
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:55
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