Class ManhattanDistanceMetric


  • public class ManhattanDistanceMetric
    extends AbstractDistanceMetric

    Manhattan Distance implementation of the AbstractDistanceMetric

    A manhattan distance with masksize = 5 would look like the following:

    manhattan distance with masksize = 5
    4 3 2 3 4
    3 2 1 2 3
    2 1 0 1 2
    3 2 1 2 3
    4 3 2 3 4
    Since:
    1.0
    Author:
    Christoph Praschl
    • Constructor Detail

      • ManhattanDistanceMetric

        public ManhattanDistanceMetric()
    • Method Detail

      • calculateMaskValue

        protected double calculateMaskValue​(int x,
                                            int y)
        Description copied from class: AbstractDistanceMetric
        Method which calculates the mask value at the given position
        Specified by:
        calculateMaskValue in class AbstractDistanceMetric
        Parameters:
        x - x position
        y - y position
        Returns:
        mask value for the given position