| 88 | |
| 89 | template <typename K> |
| 90 | double dist ( |
| 91 | const K& k, |
| 92 | const matrix<double,4,1>& a, |
| 93 | const matrix<double,5,1>& b |
| 94 | ) |
| 95 | /*! |
| 96 | ensures |
| 97 | - returns the distance between the a and b vectors in the |
| 98 | feature space defined by the given kernel k. |
| 99 | !*/ |
| 100 | { |
| 101 | const double bias = std::sqrt(k.offset); |
| 102 | return std::sqrt(length_squared(a-colm(b,0,4)) + std::pow(b(4)-bias,2.0)); |
| 103 | |
| 104 | } |
| 105 | |
| 106 | template <typename K> |
| 107 | double dist ( |
no test coverage detected