ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::env::PrecedenceSet Class Reference

PrecedenceSet contains PrecedenceRules, indexed by the area they affect. More...

#include <precedence.h>

Collaboration diagram for adore::env::PrecedenceSet:
Collaboration graph

Classes

struct  itpair
 
struct  my_equal
 custom equal test for iterators More...
 

Public Types

typedef std::pair< PriorityRoute::boost_box, PrecedenceRule * > idxRegion2Precedence
 
typedef boost::geometry::index::rtree< idxRegion2Precedence, boost::geometry::index::quadratic< 16 >, boost::geometry::index::indexable< idxRegion2Precedence >, my_equal< idxRegion2Precedence, PriorityRoute::boost_box > > Region2PrecedenceRT
 
typedef itpair< Region2PrecedenceRT::const_query_iterator, Region2PrecedenceRT::const_query_iterator > itRegion2PrecedenceRT
 

Public Member Functions

 PrecedenceSet ()
 
 PrecedenceSet (adore::mad::AFeed< PrecedenceRule > *ruleFeed)
 
void update (double radius, double x, double y)
 
bool readFile (const std::string &filename)
 reads a set of precedence rules from a file More...
 
PrecedenceRuleparseRule (const std::string &s, bool use_UTM_coordinates=true)
 creates a precedence rule from string and adds it to container. More...
 
void insertRule (const PrecedenceRule &rule)
 inserts a copy of the given rule into container More...
 
void init (PrecedenceSet *other)
 initialize by copying entries More...
 
bool contains (const PrecedenceRule &rule)
 check whether a rule is contained More...
 
void eraseRule (PrecedenceRule *rule)
 removes a rule from the container More...
 
itRegion2PrecedenceRT getRulesInRegion (double x0, double y0, double x1, double y1) const
 returns a subset of rules in a region More...
 
itRegion2PrecedenceRT getAllRulesIt () const
 returns all rules More...
 
Region2PrecedenceRTgetAllRules ()
 returns all rules More...
 
itRegion2PrecedenceRT getRulesOutsideRegion (double x0, double y0, double x1, double y1)
 returns a subset of rules outside of a region More...
 
void refocus (double x0, double y0, double x1, double y1)
 removes all rules outside of a region More...
 

Private Attributes

adore::mad::AFeed< PrecedenceRule > * ruleFeed_
 
Region2PrecedenceRT precedenceRT_
 

Detailed Description

PrecedenceSet contains PrecedenceRules, indexed by the area they affect.

Member Typedef Documentation

◆ idxRegion2Precedence

◆ itRegion2PrecedenceRT

typedef itpair<Region2PrecedenceRT::const_query_iterator,Region2PrecedenceRT::const_query_iterator> adore::env::PrecedenceSet::itRegion2PrecedenceRT

◆ Region2PrecedenceRT

typedef boost::geometry::index::rtree< idxRegion2Precedence, boost::geometry::index::quadratic<16>, boost::geometry::index::indexable<idxRegion2Precedence>, my_equal<idxRegion2Precedence,PriorityRoute::boost_box> > adore::env::PrecedenceSet::Region2PrecedenceRT

Constructor & Destructor Documentation

◆ PrecedenceSet() [1/2]

adore::env::PrecedenceSet::PrecedenceSet ( )
inline

◆ PrecedenceSet() [2/2]

adore::env::PrecedenceSet::PrecedenceSet ( adore::mad::AFeed< PrecedenceRule > *  ruleFeed)
inline

Member Function Documentation

◆ contains()

bool adore::env::PrecedenceSet::contains ( const PrecedenceRule rule)
inline

check whether a rule is contained

Here is the caller graph for this function:

◆ eraseRule()

void adore::env::PrecedenceSet::eraseRule ( PrecedenceRule rule)
inline

removes a rule from the container

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllRules()

Region2PrecedenceRT* adore::env::PrecedenceSet::getAllRules ( )
inline

returns all rules

Here is the caller graph for this function:

◆ getAllRulesIt()

itRegion2PrecedenceRT adore::env::PrecedenceSet::getAllRulesIt ( ) const
inline

returns all rules

Here is the caller graph for this function:

◆ getRulesInRegion()

itRegion2PrecedenceRT adore::env::PrecedenceSet::getRulesInRegion ( double  x0,
double  y0,
double  x1,
double  y1 
) const
inline

returns a subset of rules in a region

Here is the caller graph for this function:

◆ getRulesOutsideRegion()

itRegion2PrecedenceRT adore::env::PrecedenceSet::getRulesOutsideRegion ( double  x0,
double  y0,
double  x1,
double  y1 
)
inline

returns a subset of rules outside of a region

Here is the caller graph for this function:

◆ init()

void adore::env::PrecedenceSet::init ( PrecedenceSet other)
inline

initialize by copying entries

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertRule()

void adore::env::PrecedenceSet::insertRule ( const PrecedenceRule rule)
inline

inserts a copy of the given rule into container

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseRule()

PrecedenceRule* adore::env::PrecedenceSet::parseRule ( const std::string &  s,
bool  use_UTM_coordinates = true 
)
inline

creates a precedence rule from string and adds it to container.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readFile()

bool adore::env::PrecedenceSet::readFile ( const std::string &  filename)
inline

reads a set of precedence rules from a file

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refocus()

void adore::env::PrecedenceSet::refocus ( double  x0,
double  y0,
double  x1,
double  y1 
)
inline

removes all rules outside of a region

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void adore::env::PrecedenceSet::update ( double  radius,
double  x,
double  y 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ precedenceRT_

Region2PrecedenceRT adore::env::PrecedenceSet::precedenceRT_
private

◆ ruleFeed_

adore::mad::AFeed<PrecedenceRule>* adore::env::PrecedenceSet::ruleFeed_
private

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