| 194 | } |
| 195 | |
| 196 | double |
| 197 | squaredDistNorm2(const MappedColumnVector& inX, const MappedColumnVector& inY) { |
| 198 | if (inX.size() != inY.size()) { |
| 199 | throw std::runtime_error("Found input arrays of " |
| 200 | "different lengths unexpectedly."); |
| 201 | } |
| 202 | |
| 203 | return (inX - inY).squaredNorm(); |
| 204 | } |
| 205 | |
| 206 | double |
| 207 | distAngle(const MappedColumnVector& inX, const MappedColumnVector& inY) { |