35 #ifndef OPENMS_ANALYSIS_MAPMATCHING_FEATUREGROUPINGALGORITHMKD_H 36 #define OPENMS_ANALYSIS_MAPMATCHING_FEATUREGROUPINGALGORITHMKD_H 75 avg_distance_(avg_distance),
76 center_index_(center_index)
83 avg_distance_(rhs.avg_distance_),
84 center_index_(rhs.center_index_)
106 if (size_ > rhs.
size_)
return true;
107 if (size_ < rhs.
size_)
return false;
123 return *
this < rhs || rhs < *
this;
129 return !(*
this != rhs);
147 return avg_distance_;
153 return center_index_;
197 virtual void group(
const std::vector<FeatureMap>& maps,
ConsensusMap& out);
204 virtual void group(
const std::vector<ConsensusMap>& maps,
216 return "unlabeled_kd";
232 template <
typename MapType>
233 void group_(
const std::vector<MapType>& input_maps,
ConsensusMap& out);
239 void updateClusterProxies_(std::set<ClusterProxyKD>& potential_clusters, std::vector<ClusterProxyKD>& cluster_for_idx,
const std::set<Size>& update_these,
const std::vector<Int>& assigned,
const KDTreeFeatureMaps& kd_data);
265 #endif // OPENMS_ANALYSIS_MAPMATCHING_FEATUREGROUPINGALGORITHMKD_H
A functor class for the calculation of distances between features or consensus features.
Definition: FeatureDistance.h:90
A more convenient string class.
Definition: String.h:57
double avg_distance_
Average distance to center.
Definition: FeatureGroupingAlgorithmKD.h:162
Size center_index_
Index of center point.
Definition: FeatureGroupingAlgorithmKD.h:165
ClusterProxyKD(Size size, double avg_distance, Size center_index)
Constructor.
Definition: FeatureGroupingAlgorithmKD.h:73
ClusterProxyKD & operator=(const ClusterProxyKD &rhs)
Assignment operator.
Definition: FeatureGroupingAlgorithmKD.h:94
static FeatureGroupingAlgorithm * create()
Creates a new instance of this class (for Factory)
Definition: FeatureGroupingAlgorithmKD.h:208
FeatureDistance feature_distance_
Feature distance functor.
Definition: FeatureGroupingAlgorithmKD.h:260
static String getProductName()
Returns the product name (for the Factory)
Definition: FeatureGroupingAlgorithmKD.h:214
double mz_tol_
m/z tolerance
Definition: FeatureGroupingAlgorithmKD.h:254
Stores a set of features, together with a 2D tree for fast search.
Definition: KDTreeFeatureMaps.h:50
bool isValid() const
Valid?
Definition: FeatureGroupingAlgorithmKD.h:139
A container for consensus elements.
Definition: ConsensusMap.h:72
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:135
Proxy for a (potential) cluster.
Definition: FeatureGroupingAlgorithmKD.h:59
bool mz_ppm_
m/z unit ppm?
Definition: FeatureGroupingAlgorithmKD.h:257
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
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 "pr...
Definition: FeatureGroupingAlgorithmKD.h:104
Size size_
Cluster size.
Definition: FeatureGroupingAlgorithmKD.h:159
SignedSize progress_
Current progress for logging.
Definition: FeatureGroupingAlgorithmKD.h:248
Base class for all feature grouping algorithms.
Definition: FeatureGroupingAlgorithm.h:50
~ClusterProxyKD()
Destructor (non-virtual to save memory)
Definition: FeatureGroupingAlgorithmKD.h:89
bool operator==(const ClusterProxyKD &rhs) const
Equality operator.
Definition: FeatureGroupingAlgorithmKD.h:127
ClusterProxyKD()
Default constructor.
Definition: FeatureGroupingAlgorithmKD.h:65
double rt_tol_secs_
RT tolerance.
Definition: FeatureGroupingAlgorithmKD.h:251
Size getSize() const
Cluster size.
Definition: FeatureGroupingAlgorithmKD.h:133
A feature grouping algorithm for unlabeled data.
Definition: FeatureGroupingAlgorithmKD.h:179
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
double getAvgDistance() const
Average distance to center.
Definition: FeatureGroupingAlgorithmKD.h:145
ClusterProxyKD(const ClusterProxyKD &rhs)
Copy constructor.
Definition: FeatureGroupingAlgorithmKD.h:81
Size getCenterIndex() const
Index of center point.
Definition: FeatureGroupingAlgorithmKD.h:151
bool operator!=(const ClusterProxyKD &rhs) const
Inequality operator.
Definition: FeatureGroupingAlgorithmKD.h:121