| 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 | { |
no test coverage detected