35 #ifndef OPENMS_KERNEL_FEATURE_H
36 #define OPENMS_KERNEL_FEATURE_H
85 QualityType getOverallQuality()
const;
89 void setOverallQuality(QualityType q);
92 QualityType getQuality(
Size index)
const;
94 void setQuality(
Size index, QualityType q);
111 const std::vector<ConvexHull2D> & getConvexHulls()
const;
114 std::vector<ConvexHull2D> & getConvexHulls();
116 void setConvexHulls(
const std::vector<ConvexHull2D> & hulls);
133 bool operator==(
const Feature & rhs)
const;
136 const std::vector<Feature> & getSubordinates()
const;
139 std::vector<Feature> & getSubordinates();
142 void setSubordinates(
const std::vector<Feature> & rhs);
156 template <
typename Type>
159 Size assignments = 0;
160 assignments += ((*this).*member_function)();
161 for (std::vector<Feature>::iterator iter = subordinates_.begin(); iter != subordinates_.end(); ++iter)
163 assignments += iter->applyMemberFunction(member_function);
169 template <
typename Type>
172 Size assignments = 0;
173 assignments += ((*this).*member_function)();
174 for (std::vector<Feature>::const_iterator iter = subordinates_.begin(); iter != subordinates_.end(); ++iter)
176 assignments += iter->applyMemberFunction(member_function);
184 QualityType qualities_[2];
204 #endif // OPENMS_KERNEL_FEATURE_H
Size applyMemberFunction(Size(Type::*member_function)())
Applies a member function of Type to the feature (including subordinates). The returned values are ac...
Definition: Feature.h:157
Compare by quality.
Definition: BaseFeature.h:108
Size applyMemberFunction(Size(Type::*member_function)() const) const
The "const" variant.
Definition: Feature.h:170
QualityLess OverallQualityLess
Compare by quality.
Definition: Feature.h:97
A 2-dimensional hull representation in [counter]clockwise direction - depending on axis labelling...
Definition: ConvexHull2D.h:75
A basic LC-MS feature.
Definition: BaseFeature.h:55
ModelDescription< 2 > model_desc_
Description of the theoretical model the feature was constructed with.
Definition: Feature.h:187
ConvexHull2D convex_hull_
Overall convex hull of the feature.
Definition: Feature.h:196
std::vector< ConvexHull2D > convex_hulls_
Array of convex hulls (one for each mass trace)
Definition: Feature.h:190
std::vector< Feature > subordinates_
subordinate features (e.g. features that the ModelFitter discarded due to inferior quality) ...
Definition: Feature.h:199
An LC-MS feature.
Definition: Feature.h:66
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
bool convex_hulls_modified_
Flag that indicates if the overall convex hull needs to be recomputed (i.e. mass trace convex hulls w...
Definition: Feature.h:193