Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater > Class Template Reference

Generic Sweep Line template Stores a Sweep Line Status (SLS), keeping track of the current state of the sweep Stores an Event Queue for processing the events in the appropiate order. More...

#include <SweepLine.hpp>

Classes

struct  DefaultInsertEvent
 
struct  DefaultRemoveEvent
 
class  IEvent
 Interface for EventQueue events. process(...) is executed whenever an element is polled from the EventQueue getEventType() returns the type of Event (INSERT|REMOVE) eventPoint() returns a numeric value for the Event to determine the order in the EventQueue. More...
 
struct  InsertEvent
 
struct  RemoveEvent
 

Public Types

using eventPointer = std::unique_ptr< IEvent >
 
using SLS = std::set< const Input *, SLSOrdering >
 
using EventQ = std::priority_queue< eventPointer, std::vector< eventPointer >, EventQueueGreaterPtr >
 

Public Member Functions

void addEvent (eventPointer event) noexcept
 
void removeEvent (eventPointer const &event) noexcept
 
eventPointer nextEvent () noexcept
 
void addSLS (const Input *input) noexcept
 
void removeSLS (const Input *input) noexcept
 
bool containsSLS (const Input *input) noexcept
 
const SLS & getSLS () const noexcept
 
SLS & getSLS () noexcept
 
auto lowerBound (const Input &input) const noexcept
 
auto upperBound (const Input &input) const noexcept
 
const EventQ & getEventQueue () const noexcept
 
EventQ & getEventQueue () noexcept
 
void addEvents (util::forward_range_of< eventPointer > auto &&events) noexcept
 
void addEvents (util::forward_range_of< Input > auto const &objects, util::UnaryFunction< Input, std::vector< eventPointer > > auto eventMapper) noexcept
 
Output sweep (Output &output) noexcept
 

Detailed Description

template<typename Input, typename Output, util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
class fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >

Generic Sweep Line template Stores a Sweep Line Status (SLS), keeping track of the current state of the sweep Stores an Event Queue for processing the events in the appropiate order.

Template Parameters
Inputinput type, stored in the SLS
Outputoutput type, return after the sweep in a vector
SLSLessBiPredicate for sorting the SLS
EventQueueGreaterBiPredicate for sorting the event points

Member Typedef Documentation

◆ eventPointer

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
using fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::eventPointer = std::unique_ptr<IEvent>

◆ EventQ

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
using fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::EventQ = std::priority_queue<eventPointer,std::vector<eventPointer>,EventQueueGreaterPtr>

◆ SLS

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
using fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::SLS = std::set<const Input *,SLSOrdering>

Member Function Documentation

◆ addEvent()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
void fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::addEvent ( eventPointer  event)
inlinenoexcept

◆ addEvents() [1/2]

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
void fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::addEvents ( util::forward_range_of< eventPointer > auto &&  events)
inlinenoexcept

◆ addEvents() [2/2]

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
void fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::addEvents ( util::forward_range_of< Input > auto const &  objects,
util::UnaryFunction< Input, std::vector< eventPointer > > auto  eventMapper 
)
inlinenoexcept

◆ addSLS()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
void fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::addSLS ( const Input *  input)
inlinenoexcept

◆ containsSLS()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
bool fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::containsSLS ( const Input *  input)
inlinenoexcept

◆ getEventQueue() [1/2]

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
const EventQ & fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::getEventQueue ( ) const
inlinenoexcept

◆ getEventQueue() [2/2]

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
EventQ & fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::getEventQueue ( )
inlinenoexcept

◆ getSLS() [1/2]

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
const SLS & fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::getSLS ( ) const
inlinenoexcept

◆ getSLS() [2/2]

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
SLS & fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::getSLS ( )
inlinenoexcept

◆ lowerBound()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
auto fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::lowerBound ( const Input &  input) const
inlinenoexcept

◆ nextEvent()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
eventPointer fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::nextEvent ( )
inlinenoexcept

◆ removeEvent()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
void fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::removeEvent ( eventPointer const &  event)
inlinenoexcept

◆ removeSLS()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
void fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::removeSLS ( const Input *  input)
inlinenoexcept

◆ sweep()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
Output fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::sweep ( Output &  output)
inlinenoexcept

◆ upperBound()

template<typename Input , typename Output , util::BiPredicate< Input > SLSLess = std::less<Input>, bool InsertEventsFirst = false, util::BiPredicate< fishnet::math::DEFAULT_NUMERIC > EventQueueGreater = std::greater<fishnet::math::DEFAULT_NUMERIC>>
auto fishnet::geometry::SweepLine< Input, Output, SLSLess, InsertEventsFirst, EventQueueGreater >::upperBound ( const Input &  input) const
inlinenoexcept

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