Documentation of 'org.ujmp.core.util.ManhattanDistance' Java class
ManhattanDistance
org.ujmp.core.util

Class ManhattanDistance

  • All Implemented Interfaces:
    DistanceMeasure


    public class ManhattanDistance
    extends java.lang.Object
    implements DistanceMeasure
    This distance measure yields the Manhattan distance between two samples of double values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double getDistance(double[] sample1, double[] sample2)
      Get the distance between two data samples.
      • Methods inherited from class java.lang.Object

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

      • ManhattanDistance

        public ManhattanDistance()
    • Method Detail

      • getDistance

        public double getDistance(double[] sample1,
                                  double[] sample2)
                           throws java.lang.IllegalArgumentException
        Get the distance between two data samples.
        Specified by:
        getDistance in interface DistanceMeasure
        Parameters:
        sample1 - the first sample of double values
        sample2 - the second sample of double values
        Returns:
        the distance between sample1 and sample2
        Throws:
        java.lang.IllegalArgumentException - if the two samples contain different amounts of values

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.