OpenMS
|
Proxy for a (potential) cluster. More...
#include <OpenMS/ANALYSIS/MAPMATCHING/FeatureGroupingAlgorithmKD.h>
Public Member Functions | |
ClusterProxyKD () | |
Default constructor. More... | |
ClusterProxyKD (Size size, double avg_distance, Size center_index) | |
Constructor. More... | |
ClusterProxyKD (const ClusterProxyKD &rhs) | |
Copy constructor. More... | |
~ClusterProxyKD () | |
Destructor (non-virtual to save memory) More... | |
ClusterProxyKD & | operator= (const ClusterProxyKD &rhs) |
Assignment operator. More... | |
bool | operator< (const ClusterProxyKD &rhs) const |
Less-than operator for sorting / equality check in std::set. We use the ordering in std::set as a "priority queue", hence a < b means cluster a will be preferred over b. More... | |
bool | operator!= (const ClusterProxyKD &rhs) const |
Inequality operator. More... | |
bool | operator== (const ClusterProxyKD &rhs) const |
Equality operator. More... | |
Size | getSize () const |
Cluster size. More... | |
bool | isValid () const |
Valid? More... | |
double | getAvgDistance () const |
Average distance to center. More... | |
Size | getCenterIndex () const |
Index of center point. More... | |
Private Attributes | |
Size | size_ |
Cluster size. More... | |
double | avg_distance_ |
Average distance to center. More... | |
Size | center_index_ |
Index of center point. More... | |
Proxy for a (potential) cluster.
Proxy for a (potential) cluster. Instead of storing the entire cluster, this stores only its size, average distance to center, and the index of the center point. Objects of this class are kept in a sorted binary search tree (aka std::set) and operator< is defined in such a way that the first element of the set is always a cluster proxy for a cluster of current maximum size and smallest intra-cluster distance. The actual cluster points are then retrieved again from the kd-tree and a consensus feature is added to the output consensus map.
|
inline |
Default constructor.
|
inline |
Constructor.
|
inline |
Copy constructor.
|
inline |
Destructor (non-virtual to save memory)
|
inline |
Average distance to center.
|
inline |
Cluster size.
|
inline |
Valid?
|
inline |
Inequality operator.
|
inline |
Less-than operator for sorting / equality check in std::set. We use the ordering in std::set as a "priority queue", hence a < b means cluster a will be preferred over b.
References ClusterProxyKD::avg_distance_, ClusterProxyKD::center_index_, and ClusterProxyKD::size_.
|
inline |
Assignment operator.
References ClusterProxyKD::avg_distance_, ClusterProxyKD::center_index_, and ClusterProxyKD::size_.
|
inline |
Equality operator.
|
private |
Average distance to center.
Referenced by ClusterProxyKD::operator<(), and ClusterProxyKD::operator=().
|
private |
Index of center point.
Referenced by ClusterProxyKD::operator<(), and ClusterProxyKD::operator=().
|
private |
Cluster size.
Referenced by ClusterProxyKD::operator<(), and ClusterProxyKD::operator=().