public class PointPairDistance extends Object
Constructor and Description |
---|
PointPairDistance()
Creates an instance of this class
|
Modifier and Type | Method and Description |
---|---|
Coordinate |
getCoordinate(int i)
Gets one of the paired points
|
Coordinate[] |
getCoordinates()
Gets the paired points
|
double |
getDistance()
Gets the distance between the paired points
|
void |
initialize()
Initializes this instance.
|
void |
initialize(Coordinate p0,
Coordinate p1)
Initializes the points, computing the distance between them.
|
void |
setMaximum(Coordinate p0,
Coordinate p1) |
void |
setMaximum(PointPairDistance ptDist) |
void |
setMinimum(Coordinate p0,
Coordinate p1) |
void |
setMinimum(PointPairDistance ptDist) |
String |
toString() |
public void initialize()
public void initialize(Coordinate p0, Coordinate p1)
p0
- the 1st pointp1
- the 2nd pointpublic double getDistance()
public Coordinate[] getCoordinates()
public Coordinate getCoordinate(int i)
i
- the index of the paired point (0 or 1)public void setMaximum(PointPairDistance ptDist)
public void setMaximum(Coordinate p0, Coordinate p1)
public void setMinimum(PointPairDistance ptDist)
public void setMinimum(Coordinate p0, Coordinate p1)
Copyright © 2022. All rights reserved.