Class PointPairDistance


  • public class PointPairDistance
    extends java.lang.Object
    Contains a pair of points and the distance between them. Provides methods to update with a new point pair with either maximum or minimum distance.
    • Field Detail

      • distance

        private double distance
      • isNull

        private boolean isNull
    • Constructor Detail

      • PointPairDistance

        public PointPairDistance()
    • Method Detail

      • initialize

        public void initialize()
      • initialize

        private void initialize​(Coordinate p0,
                                Coordinate p1,
                                double distance)
        Initializes the points, avoiding recomputing the distance.
        Parameters:
        p0 -
        p1 -
        distance - the distance between p0 and p1
      • getDistance

        public double getDistance()
      • getCoordinates

        public Coordinate[] getCoordinates()
      • getCoordinate

        public Coordinate getCoordinate​(int i)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object