Class ManhattanMeasure

  • All Implemented Interfaces:
    IMeasure, ISpaceMeasure

    public class ManhattanMeasure
    extends ASpaceMeasure
    Implements a similarity measure based on the Manhattan distance. A Minkowski measure with p=1.
    Author:
    Jan Lippert (lippertsjan@gmail.com)
    • Constructor Detail

      • ManhattanMeasure

        public ManhattanMeasure()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: IMeasure
        Returns name of a measure.
        Returns:
        Measure name as a string
      • getThreshold

        public double getThreshold​(int dimension,
                                   double simThreshold)
      • getRuntimeApproximation

        public double getRuntimeApproximation​(double mappingSize)
        Description copied from interface: IMeasure
        Returns the runtime approximation of a measure.
        Parameters:
        mappingSize - , the mapping size returned by the measure
        Returns:
        The runtime of the measure
      • getType

        public String getType()
        Description copied from interface: IMeasure
        Returns type of a measure.
        Returns:
        The runtime of the measure
      • getSimilarity

        public double getSimilarity​(Object object1,
                                    Object object2)
        Description copied from interface: IMeasure
        Returns the similarity between two objects.
        Parameters:
        object1 - , the source object
        object2 - , the target object
        Returns:
        The similarity of the objects
      • getSimilarity

        public double getSimilarity​(Instance instance1,
                                    Instance instance2,
                                    String properties1,
                                    String properties2)
        Description copied from interface: IMeasure
        Returns the similarity between two instances, given their corresponding properties.
        Parameters:
        instance1 - , the source instance
        instance2 - , the target instance
        properties1 - , the source property
        properties2 - , the target property
        Returns:
        The similarity of the instances