GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
geos::index::chain::MonotoneChainBuilder Class Reference

Constructs MonotoneChains for sequences of Coordinates. More...

#include <MonotoneChainBuilder.h>

Public Member Functions

 MonotoneChainBuilder ()
 
 MonotoneChainBuilder (const MonotoneChainBuilder &)=delete
 
MonotoneChainBuilderoperator= (const MonotoneChainBuilder &)=delete
 

Static Public Member Functions

static std::unique_ptr< std::vector< std::unique_ptr< MonotoneChain > > > getChains (const geom::CoordinateSequence *pts, void *context)
 Return a newly-allocated vector of newly-allocated MonotoneChain objects for the given CoordinateSequence. More...
 
static void getChains (const geom::CoordinateSequence *pts, void *context, std::vector< std::unique_ptr< MonotoneChain >> &mcList)
 Computes a list of the MonotoneChains for a list of coordinates, attaching a context data object to each. More...
 
static std::unique_ptr< std::vector< std::unique_ptr< MonotoneChain > > > getChains (const geom::CoordinateSequence *pts)
 

Static Private Member Functions

static std::size_t findChainEnd (const geom::CoordinateSequence &pts, std::size_t start)
 Finds the index of the last point in a monotone chain starting at a given point. More...
 

Detailed Description

Constructs MonotoneChains for sequences of Coordinates.

TODO: use vector<const Coordinate*> instead ?

Definition at line 49 of file MonotoneChainBuilder.h.

Constructor & Destructor Documentation

geos::index::chain::MonotoneChainBuilder::MonotoneChainBuilder ( )
inline

Definition at line 53 of file MonotoneChainBuilder.h.

geos::index::chain::MonotoneChainBuilder::MonotoneChainBuilder ( const MonotoneChainBuilder )
delete

Disable copy construction and assignment. Apparently needed to make this class compile under MSVC. (See https://stackoverflow.com/q/29565299)

Member Function Documentation

static std::size_t geos::index::chain::MonotoneChainBuilder::findChainEnd ( const geom::CoordinateSequence pts,
std::size_t  start 
)
staticprivate

Finds the index of the last point in a monotone chain starting at a given point.

Repeated points (0-length segments) are included in the monotone chain returned.

Parameters
ptsthe points to scan
startthe index of the start of this chain
Returns
the index of the last point in the monotone chain starting at start.
Note
aborts if 'start' is >= pts.getSize()
static std::unique_ptr<std::vector<std::unique_ptr<MonotoneChain> > > geos::index::chain::MonotoneChainBuilder::getChains ( const geom::CoordinateSequence pts,
void *  context 
)
static

Return a newly-allocated vector of newly-allocated MonotoneChain objects for the given CoordinateSequence.

static void geos::index::chain::MonotoneChainBuilder::getChains ( const geom::CoordinateSequence pts,
void *  context,
std::vector< std::unique_ptr< MonotoneChain >> &  mcList 
)
static

Computes a list of the MonotoneChains for a list of coordinates, attaching a context data object to each.

Parameters
ptsthe list of points to compute chains for
contexta data object to attach to each chain
[out]mcLista list of the monotone chains for the points
static std::unique_ptr<std::vector<std::unique_ptr<MonotoneChain> > > geos::index::chain::MonotoneChainBuilder::getChains ( const geom::CoordinateSequence pts)
inlinestatic

Definition at line 76 of file MonotoneChainBuilder.h.

MonotoneChainBuilder& geos::index::chain::MonotoneChainBuilder::operator= ( const MonotoneChainBuilder )
delete

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