Class MetricPlane

  • Direct Known Subclasses:
    PlaneMetric

    public class MetricPlane
    extends java.lang.Object
    Template interface for metrics on type T.

    A metric is a function that defines a scalar distance between elements.
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricPlane​(long cPtr, boolean cMemoryOwn)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()  
      double distance​(Plane q)
      The distance from the zero element to q
      double distance​(Plane a, Plane b)
      The distance from element a to b.
      static long getCPtr​(MetricPlane obj)  
      int size()
      The dimension of elements on which this metric operates.

      The returns -1 if the elements don't have a measure of dimension or
      if the metric works for elements of all dimensions.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MetricPlane

        public MetricPlane​(long cPtr,
                           boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(MetricPlane obj)
      • delete

        public void delete()
      • distance

        public double distance​(Plane q)
        The distance from the zero element to q
      • distance

        public double distance​(Plane a,
                               Plane b)
        The distance from element a to b.
        Parameters:
        a - [in] first element
        b - [in] second element
        Returns:
        the distance
      • size

        public int size()
        The dimension of elements on which this metric operates.

        The returns -1 if the elements don't have a measure of dimension or
        if the metric works for elements of all dimensions.