DistanceMeasure (Apache Commons Math 3.3 API)

org.apache.commons.math3.ml.distance

## Interface DistanceMeasure

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    CanberraDistance, ChebyshevDistance, EarthMoversDistance, EuclideanDistance, ManhattanDistance

      public interface DistanceMeasure
      extends Serializable

  Interface for distance measures of n-dimensional vectors.
  Since:
    3.2
  Version:
    $Id: DistanceMeasure.java 1519184 2013-08-31 15:22:59Z tn $

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `compute(double[] a, double[] b)` Compute the distance between two n-dimensional vectors.

- - ### Method Detail

    - #### compute

          double compute(double[] a,
                       double[] b)

      Compute the distance between two n-dimensional vectors.

      The two vectors are required to have the same dimension.

      Parameters:
        `a` - the first vector
        `b` - the second vector
      Returns:
        the distance between the two vectors

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.