![]() |
OpenMS
|
Lightweight kd-tree entry: a back-pointer to a KDTreeFeatureMaps and the index of one feature in it. More...
#include <OpenMS/ANALYSIS/QUANTITATION/KDTreeFeatureNode.h>
Public Types | |
| typedef double | value_type |
| libkdtree++ requires this typedef on the value type | |
Public Member Functions | |
| KDTreeFeatureNode (KDTreeFeatureMaps *data, Size idx) | |
Create a node referencing one feature inside data. | |
| KDTreeFeatureNode (const KDTreeFeatureNode &rhs) | |
| Copy constructor - copies the back-pointer; the wrapped data object is shared. | |
| KDTreeFeatureNode & | operator= (KDTreeFeatureNode const &rhs) |
| Assignment operator - copies the back-pointer; the wrapped data object is shared. | |
| virtual | ~KDTreeFeatureNode () |
| Destructor (does not delete the wrapped data) | |
| value_type | operator[] (Size i) const |
2D coordinate accessor used by libkdtree++: [0] returns RT, [1] returns m/z (both forwarded to the parent KDTreeFeatureMaps) | |
| Size | getIndex () const |
| Global index of the referenced feature inside the parent KDTreeFeatureMaps. | |
Protected Attributes | |
| KDTreeFeatureMaps * | data_ |
| Pointer to the actual data. | |
| Size | idx_ |
| Index of this feature. | |
Private Member Functions | |
| KDTreeFeatureNode () | |
| Default constructor is not supposed to be called. | |
Lightweight kd-tree entry: a back-pointer to a KDTreeFeatureMaps and the index of one feature in it.
Used as the value type of the 2D kd-tree maintained by KDTreeFeatureMaps. The node itself carries no feature data; instead, operator[]() forwards coordinate lookups (RT for axis 0, m/z for axis 1) to the parent KDTreeFeatureMaps using the stored index. This keeps the kd-tree payload small and avoids duplicating per-feature attributes.
Copy and assignment intentionally only copy the back-pointer; the wrapped data object is shared.
| typedef double value_type |
libkdtree++ requires this typedef on the value type
| KDTreeFeatureNode | ( | KDTreeFeatureMaps * | data, |
| Size | idx | ||
| ) |
Create a node referencing one feature inside data.
| [in] | data | Back-pointer to the KDTreeFeatureMaps holding the feature; must outlive this node. |
| [in] | idx | Global index of the referenced feature inside data. |
| KDTreeFeatureNode | ( | const KDTreeFeatureNode & | rhs | ) |
Copy constructor - copies the back-pointer; the wrapped data object is shared.
|
virtual |
Destructor (does not delete the wrapped data)
|
private |
Default constructor is not supposed to be called.
| Size getIndex | ( | ) | const |
Global index of the referenced feature inside the parent KDTreeFeatureMaps.
| 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 parent KDTreeFeatureMaps)
|
protected |
Pointer to the actual data.