Class ChessboardDistanceMetric


  • public class ChessboardDistanceMetric
    extends AbstractDistanceMetric

    Chessboard Distance implementation of the AbstractDistanceMetric

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

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

      • ChessboardDistanceMetric

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