77 bool force_constraints =
false);
104 Param param = global.
copy(
"distance_" + what +
":",
true);
107 max_diff_ppm = (param.
getValue(
"unit") ==
"ppm");
111 max_diff_ppm =
false;
114 max_difference = param.
getValue(
"max_difference");
115 exponent = param.
getValue(
"exponent");
117 norm_factor = 1 / max_difference;
119 relevant = (weight != 0.0) && (exponent != 0.0);
126 double max_difference,
exponent, weight, norm_factor;
A basic LC-MS feature.
Definition: BaseFeature.h:33
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
A functor class for the calculation of distances between features or consensus features.
Definition: FeatureDistance.h:65
~FeatureDistance() override
Destructor.
static const double infinity
Value to return if max. difference is exceeded or if charge states don't match.
Definition: FeatureDistance.h:68
bool ignore_adduct_
Compute a distance even if adducts don't match?
Definition: FeatureDistance.h:149
std::pair< bool, double > operator()(const BaseFeature &left, const BaseFeature &right)
Evaluation operator - checks constraints and computes the distance between two features.
FeatureDistance & operator=(const FeatureDistance &other)
Assignment operator.
bool force_constraints_
Always return infinity if "max. difference" constraints are not met?
Definition: FeatureDistance.h:152
DistanceParams_ params_intensity_
Definition: FeatureDistance.h:137
double max_intensity_
Maximum intensity of features (for normalization)
Definition: FeatureDistance.h:143
bool log_transform_
Log-transform intensities when computing intensity distance?
Definition: FeatureDistance.h:155
double distance_(double diff, const DistanceParams_ ¶ms) const
Computes a distance component given absolute difference and parameters.
void updateMembers_() override
Docu in base class.
FeatureDistance(double max_intensity=1.0, bool force_constraints=false)
Constructor.
bool ignore_charge_
Compute a distance even if charge states don't match?
Definition: FeatureDistance.h:146
double total_weight_reciprocal_
Reciprocal value of the total weight in the distance function.
Definition: FeatureDistance.h:140
Management and storage of parameters / INI files.
Definition: Param.h:44
Param copy(const std::string &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
const ParamValue & getValue(const std::string &key) const
Returns a value of a parameter.
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Structure for storing distance parameters.
Definition: FeatureDistance.h:99
DistanceParams_()
Definition: FeatureDistance.h:100
bool max_diff_ppm
Definition: FeatureDistance.h:127
DistanceParams_(const String &what, const Param &global)
Definition: FeatureDistance.h:102
double exponent
Definition: FeatureDistance.h:126