Class EuclideanMetric

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

public class EuclideanMetric extends Object implements Metric<Vector<Real>>
Euclidean metric (L2 norm).

d(x,y) = √(Σ(xi - yi)²)

*

Reference:
Euclid. (c. 300 BC). Elements.

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

    • EuclideanMetric

      public EuclideanMetric()
  • 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)