Class ManhattanMetric

java.lang.Object
org.episteme.core.mathematics.topology.metrics.ManhattanMetric
All Implemented Interfaces:
Metric<Vector<Real>>

public class ManhattanMetric extends Object implements Metric<Vector<Real>>
Manhattan metric (L1 norm, taxicab metric).

d(x,y) = Σ|xi - yi|

*

Reference:
Fréchet, M. (1906). Sur quelques points du calcul fonctionnel. Rendiconti del Circolo Matematico di Palermo.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • ManhattanMetric

      public ManhattanMetric()
  • Method Details

    • distance

      public Real distance(Vector<Real> a, Vector<Real> b)
      Description copied from interface: Metric
      Computes the distance between two objects.
      Specified by:
      distance in interface Metric<Vector<Real>>
      Parameters:
      a - the first object
      b - the second object
      Returns:
      the distance between a and b (always non-negative)