org.apache.ignite.ml.math.distances

## Class ChebyshevDistance

- java.lang.Object
- - org.apache.ignite.ml.math.distances.ChebyshevDistance

- All Implemented Interfaces:
    Externalizable, Serializable, DistanceMeasure

      public class ChebyshevDistance
      extends Object
      implements DistanceMeasure

  Calculates the `max(x_i - y_i)` (Chebyshev) distance between two points.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChebyshevDistance()`

  - ### Method Summary

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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.ignite.ml.math.distances.DistanceMeasure

      `compute, readExternal, writeExternal`

- - ### Constructor Detail

    - #### ChebyshevDistance

          public ChebyshevDistance()

  - ### Method Detail

    - #### compute

          public double compute(Vector a,
                                Vector b)
                         throws CardinalityException

      Compute the distance between two n-dimensional vectors.

      The two vectors are required to have the same dimension.

      Specified by:
        `compute` in interface `DistanceMeasure`
      Parameters:
        `a` - The first vector.
        `b` - The second vector.
      Returns:
        The distance between the two vectors.
      Throws:
        `CardinalityException` - if the array lengths differ.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023