MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / weightData

Method weightData

src/openms/source/ANALYSIS/MAPMATCHING/TransformationModel.cpp:74–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 void TransformationModel::weightData(TransformationModel::DataPoints& data)
75 {
76 if (!weighting_ ) return;
77
78 // weight x values
79 if (x_weight_ != "x" && !data.empty())
80 {
81 for (size_t i = 0; i < data.size(); ++i)
82 {
83 // check x datum ranges
84 data[i].first = checkDatumRange(data[i].first,x_datum_min_,x_datum_max_);
85 // weight x datum
86 data[i].first = weightDatum(data[i].first, x_weight_);
87 }
88 }
89
90 // weight y values
91 if (y_weight_ != "y" && !data.empty())
92 {
93 for (size_t i = 0; i < data.size(); ++i)
94 {
95 // check y datum ranges
96 data[i].second = checkDatumRange(data[i].second,y_datum_min_, y_datum_max_);
97 // weight y datum
98 data[i].second = weightDatum(data[i].second, y_weight_);
99 }
100 }
101 }
102
103 void TransformationModel::unWeightData(TransformationModel::DataPoints& data)
104 {

Callers 2

calculateBiasAndRMethod · 0.80

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected