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

Method unWeightData

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

Source from the content-addressed store, hash-verified

101 }
102
103 void TransformationModel::unWeightData(TransformationModel::DataPoints& data)
104 {
105 if (!weighting_ ) return;
106
107 // unweight x values
108 if (x_weight_ != "x" && !data.empty())
109 {
110 for (size_t i = 0; i < data.size(); ++i)
111 {
112 data[i].first = unWeightDatum(data[i].first, x_weight_);
113 }
114 }
115 // unweight y values
116 if (y_weight_ != "y" && !data.empty())
117 {
118 for (size_t i = 0; i < data.size(); ++i)
119 {
120 data[i].second = unWeightDatum(data[i].second, y_weight_);
121 }
122 }
123 }
124
125 bool TransformationModel::checkValidWeight(const String& weight, const std::vector<String>& valid_weights) const
126 {

Callers 1

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected