| 158 | } |
| 159 | |
| 160 | double |
| 161 | distNorm1(const MappedColumnVector& inX, const MappedColumnVector& inY) { |
| 162 | if (inX.size() != inY.size()) { |
| 163 | throw std::runtime_error("Found input arrays of " |
| 164 | "different lengths unexpectedly."); |
| 165 | } |
| 166 | |
| 167 | return (inX - inY).lpNorm<1>(); |
| 168 | } |
| 169 | |
| 170 | double |
| 171 | distNorm2(const MappedColumnVector& inX, const MappedColumnVector& inY) { |