GEOS  3.9.1dev
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
geos::index::strtree::SimpleSTRpair Class Reference

#include <SimpleSTRdistance.h>

Collaboration diagram for geos::index::strtree::SimpleSTRpair:
[legend]

Public Member Functions

 SimpleSTRpair (SimpleSTRnode *p_node1, SimpleSTRnode *p_node2, ItemDistance *p_itemDistance)
 
SimpleSTRnodegetNode (int i) const
 
double getDistance () const
 Gets the minimum possible distance between the SimpleSTRnode in this pair. More...
 
bool isLeaves () const
 
double maximumDistance ()
 Computes the maximum distance between any two items in the pair of nodes. More...
 

Private Member Functions

double distance ()
 Computes the distance between the SimpleSTRnodes in this pair. The nodes are either composites or leaves. More...
 

Private Attributes

SimpleSTRnodenode1
 
SimpleSTRnodenode2
 
ItemDistanceitemDistance
 
double m_distance
 

Friends

std::ostream & operator<< (std::ostream &os, SimpleSTRpair &pair)
 

Detailed Description

Definition at line 40 of file SimpleSTRdistance.h.

Constructor & Destructor Documentation

geos::index::strtree::SimpleSTRpair::SimpleSTRpair ( SimpleSTRnode p_node1,
SimpleSTRnode p_node2,
ItemDistance p_itemDistance 
)
inline

Definition at line 64 of file SimpleSTRdistance.h.

References geos::algorithm::operator<<().

Here is the call graph for this function:

Member Function Documentation

double geos::index::strtree::SimpleSTRpair::distance ( )
private

Computes the distance between the SimpleSTRnodes in this pair. The nodes are either composites or leaves.

If either is composite, the distance is computed as the minimum distance between the bounds. If both are leaves, the distance is computed by ItemDistance::distance(const void* item1, const void* item2).

Returns
the distance between the items
double geos::index::strtree::SimpleSTRpair::getDistance ( ) const

Gets the minimum possible distance between the SimpleSTRnode in this pair.

If the members are both items, this will be the exact distance between them. Otherwise, this distance will be a lower bound on the distances between the items in the members.

Returns
the exact or lower bound distance for this pair

Referenced by geos::index::strtree::SimpleSTRdistance::STRpairQueueCompare::operator()().

Here is the caller graph for this function:

SimpleSTRnode* geos::index::strtree::SimpleSTRpair::getNode ( int  i) const
bool geos::index::strtree::SimpleSTRpair::isLeaves ( ) const

Tests if both elements of the pair are leaf nodes

Returns
true if both pair elements are leaf nodes
double geos::index::strtree::SimpleSTRpair::maximumDistance ( )

Computes the maximum distance between any two items in the pair of nodes.

Returns
the maximum distance between items in the pair

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
SimpleSTRpair pair 
)
friend

Member Data Documentation

ItemDistance* geos::index::strtree::SimpleSTRpair::itemDistance
private

Definition at line 46 of file SimpleSTRdistance.h.

double geos::index::strtree::SimpleSTRpair::m_distance
private

Definition at line 47 of file SimpleSTRdistance.h.

SimpleSTRnode* geos::index::strtree::SimpleSTRpair::node1
private

Definition at line 44 of file SimpleSTRdistance.h.

SimpleSTRnode* geos::index::strtree::SimpleSTRpair::node2
private

Definition at line 45 of file SimpleSTRdistance.h.


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