15 #ifndef MLPACK_CORE_METRICS_LMETRIC_HPP 16 #define MLPACK_CORE_METRICS_LMETRIC_HPP 62 template<
int TPower,
bool TTakeRoot = true>
82 template<
typename VecTypeA,
typename VecTypeB>
83 static typename VecTypeA::elem_type
Evaluate(
const VecTypeA& a,
87 template<
typename Archive>
91 static const int Power = TPower;
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &, const uint32_t)
Serialize the metric (nothing to do).
Definition: lmetric.hpp:88
static VecTypeA::elem_type Evaluate(const VecTypeA &a, const VecTypeB &b)
Computes the distance between two points.
Definition: lmetric_impl.hpp:24
The L_p metric for arbitrary integer p, with an option to take the root.
Definition: lmetric.hpp:63
static const int Power
The power of the metric.
Definition: lmetric.hpp:91
LMetric()
Default constructor does nothing, but is required to satisfy the Metric policy.
Definition: lmetric.hpp:70
static const bool TakeRoot
Whether or not the root is taken.
Definition: lmetric.hpp:93