12 #ifndef MLPACK_METHODS_FASTMKS_IP_METRIC_IMPL_HPP 13 #define MLPACK_METHODS_FASTMKS_IP_METRIC_IMPL_HPP 25 template<
typename KernelType>
27 kernel(new KernelType()),
34 template<
typename KernelType>
43 template<
typename KernelType>
50 template<
typename KernelType>
52 kernel(new KernelType(*other.kernel)),
58 template<
typename KernelType>
67 kernel =
new KernelType(*other.kernel);
72 template<
typename KernelType>
73 template<
typename Vec1Type,
typename Vec2Type>
80 return sqrt(kernel->Evaluate(a, a) + kernel->Evaluate(b, b) -
81 2 * kernel->Evaluate(a, b));
85 template<
typename KernelType>
86 template<
typename Archive>
92 if (cereal::is_loading<Archive>())
105 template<
typename Vec1Type,
typename Vec2Type>
IPMetric()
Create the IPMetric without an instantiated kernel.
Definition: ip_metric_impl.hpp:26
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The inner product metric, IPMetric, takes a given Mercer kernel (KernelType), and when Evaluate() is ...
Definition: ip_metric.hpp:32
The L_p metric for arbitrary integer p, with an option to take the root.
Definition: lmetric.hpp:63
#define CEREAL_POINTER(T)
Cereal does not support the serialization of raw pointer.
Definition: pointer_wrapper.hpp:96