| 109 | } |
| 110 | |
| 111 | double truncate(double x, double lower_bound, double upper_bound) { |
| 112 | if (x <= lower_bound) { |
| 113 | return lower_bound; |
| 114 | } else if (x >= upper_bound) { |
| 115 | return upper_bound; |
| 116 | } else { |
| 117 | return x; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | std::vector<double> transform(const std::vector<double> &x, |
| 122 | const std::vector<double> &y, |
no outgoing calls
no test coverage detected