Class WeightedEuclideanMetricQ


  • public class WeightedEuclideanMetricQ
    extends MetricQ
    Weighted Euclidean metric for vector types.

    Given a vector of weights \mathbf{\omega}\in\mathbb{R}^n ,
    the distance between two points
    P = (p_1, p_2, ..., p_n)
    and
    Q = (q_1, q_2, ..., q_n)
    is defined as
    \sqrt{\sum_{i=1}^{n}(\omega_i * (p_i - q_i))^2} .

    • Constructor Detail

      • WeightedEuclideanMetricQ

        public WeightedEuclideanMetricQ​(long cPtr,
                                        boolean cMemoryOwn)
      • WeightedEuclideanMetricQ

        public WeightedEuclideanMetricQ​(Q weights)
        Weighted metric.
        Parameters:
        weights - [in] Weights for the metric.