GEOS  3.9.1dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::algorithm::distance::PointPairDistance Class Reference

#include <PointPairDistance.h>

Public Member Functions

 PointPairDistance ()
 
void initialize ()
 
void initialize (const geom::Coordinate &p0, const geom::Coordinate &p1)
 
double getDistance () const
 
const std::array< geom::Coordinate, 2 > & getCoordinates () const
 
const geom::CoordinategetCoordinate (size_t i) const
 
void setMaximum (const PointPairDistance &ptDist)
 
void setMaximum (const geom::Coordinate &p0, const geom::Coordinate &p1)
 
void setMinimum (const PointPairDistance &ptDist)
 
void setMinimum (const geom::Coordinate &p0, const geom::Coordinate &p1)
 
bool getIsNull ()
 

Private Member Functions

void initialize (const geom::Coordinate &p0, const geom::Coordinate &p1, double distSquared)
 

Private Attributes

std::array< geom::Coordinate, 2 > pt
 
double distanceSquared
 
bool isNull
 

Detailed Description

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.

Definition at line 37 of file PointPairDistance.h.

Constructor & Destructor Documentation

geos::algorithm::distance::PointPairDistance::PointPairDistance ( )
inline

Definition at line 40 of file PointPairDistance.h.

Member Function Documentation

const geom::Coordinate& geos::algorithm::distance::PointPairDistance::getCoordinate ( size_t  i) const
inline

Definition at line 74 of file PointPairDistance.h.

References pt.

const std::array<geom::Coordinate, 2>& geos::algorithm::distance::PointPairDistance::getCoordinates ( ) const
inline

Definition at line 68 of file PointPairDistance.h.

References pt.

double geos::algorithm::distance::PointPairDistance::getDistance ( ) const
inline

Definition at line 62 of file PointPairDistance.h.

References distanceSquared.

bool geos::algorithm::distance::PointPairDistance::getIsNull ( )
inline

Definition at line 119 of file PointPairDistance.h.

References isNull.

void geos::algorithm::distance::PointPairDistance::initialize ( )
inline

Definition at line 47 of file PointPairDistance.h.

References isNull.

Referenced by setMaximum(), and setMinimum().

Here is the caller graph for this function:

void geos::algorithm::distance::PointPairDistance::initialize ( const geom::Coordinate p0,
const geom::Coordinate p1 
)
inline

Definition at line 53 of file PointPairDistance.h.

References geos::geom::Coordinate::distanceSquared(), distanceSquared, isNull, and pt.

Here is the call graph for this function:

void geos::algorithm::distance::PointPairDistance::initialize ( const geom::Coordinate p0,
const geom::Coordinate p1,
double  distSquared 
)
inlineprivate

Initializes the points, avoiding recomputing the distance.

Parameters
p0
p1
distthe distance between p0 and p1

Definition at line 133 of file PointPairDistance.h.

References distanceSquared, isNull, and pt.

void geos::algorithm::distance::PointPairDistance::setMaximum ( const PointPairDistance ptDist)
inline

Definition at line 81 of file PointPairDistance.h.

References pt.

void geos::algorithm::distance::PointPairDistance::setMaximum ( const geom::Coordinate p0,
const geom::Coordinate p1 
)
inline

Definition at line 87 of file PointPairDistance.h.

References geos::geom::Coordinate::distanceSquared(), distanceSquared, initialize(), and isNull.

Here is the call graph for this function:

void geos::algorithm::distance::PointPairDistance::setMinimum ( const PointPairDistance ptDist)
inline

Definition at line 100 of file PointPairDistance.h.

References pt.

void geos::algorithm::distance::PointPairDistance::setMinimum ( const geom::Coordinate p0,
const geom::Coordinate p1 
)
inline

Definition at line 106 of file PointPairDistance.h.

References geos::geom::Coordinate::distanceSquared(), distanceSquared, initialize(), and isNull.

Here is the call graph for this function:

Member Data Documentation

double geos::algorithm::distance::PointPairDistance::distanceSquared
private

Definition at line 144 of file PointPairDistance.h.

Referenced by getDistance(), initialize(), setMaximum(), and setMinimum().

bool geos::algorithm::distance::PointPairDistance::isNull
private

Definition at line 146 of file PointPairDistance.h.

Referenced by getIsNull(), initialize(), setMaximum(), and setMinimum().

std::array<geom::Coordinate, 2> geos::algorithm::distance::PointPairDistance::pt
private

The documentation for this class was generated from the following file: