Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
SPTree< E, C > Class Template Reference

#include <SPTree.h>

Collaboration diagram for SPTree< E, C >:
[legend]

Data Structures

class  EdgeByTTComparator

Public Types

typedef std::pair< const C *, const C * > CHConnectionPair
typedef std::vector< CHConnectionPairCHConnectionPairs
typedef std::vector< C > CHConnections

Public Member Functions

const CHConnectionPairsgetNeededShortcuts (const E *excluded)
void init ()
void rebuildFrom (E *start, const E *excluded)
 build a shortest path tree from start to a depth of myMaxdepth. The given edge is excluded from this tree
void registerForValidation (const C *aInfo, const C *fInfo)
 save source/target pair for later validation
 SPTree (int maxDepth, bool validatePermissions)
 Constructor.
bool validatePermissions ()
 whether permissions should be validated;

Private Member Functions

void debugPrintVector (std::vector< E * > &vec, E *start, const E *excluded)
double dijkstraTT (E *start, E *dest, const E *excluded, SVCPermissions permissions)

Private Attributes

EdgeByTTComparator myCmp
 comparator for search queue
std::vector< E * > myFound
 the list of visited edges (used when resetting)
std::vector< E * > myFrontier
 the min edge heap
int myMaxDepth
 maximum search depth
CHConnectionPairs myNeededShortcuts
 vector of needed shortcuts after validation
CHConnectionPairs myShortcutsToValidate
 vector of needed shortcuts after validation
bool myValidatePermissions
 whether permissions should be validated

Detailed Description

template<class E, class C>
class SPTree< E, C >

Definition at line 36 of file SPTree.h.

Member Typedef Documentation

◆ CHConnectionPair

template<class E, class C>
typedef std::pair<const C*, const C*> SPTree< E, C >::CHConnectionPair

Definition at line 40 of file SPTree.h.

◆ CHConnectionPairs

template<class E, class C>
typedef std::vector<CHConnectionPair> SPTree< E, C >::CHConnectionPairs

Definition at line 41 of file SPTree.h.

◆ CHConnections

template<class E, class C>
typedef std::vector<C> SPTree< E, C >::CHConnections

Definition at line 39 of file SPTree.h.

Constructor & Destructor Documentation

◆ SPTree()

template<class E, class C>
SPTree< E, C >::SPTree ( int maxDepth,
bool validatePermissions )
inline

Constructor.

Definition at line 62 of file SPTree.h.

References myMaxDepth, myValidatePermissions, and validatePermissions().

Member Function Documentation

◆ debugPrintVector()

template<class E, class C>
void SPTree< E, C >::debugPrintVector ( std::vector< E * > & vec,
E * start,
const E * excluded )
inlineprivate

Definition at line 208 of file SPTree.h.

References myFound.

◆ dijkstraTT()

template<class E, class C>
double SPTree< E, C >::dijkstraTT ( E * start,
E * dest,
const E * excluded,
SVCPermissions permissions )
inlineprivate

Definition at line 160 of file SPTree.h.

References init(), myCmp, myFound, myFrontier, and myMaxDepth.

Referenced by getNeededShortcuts().

Here is the caller graph for this function:

◆ getNeededShortcuts()

template<class E, class C>
const CHConnectionPairs & SPTree< E, C >::getNeededShortcuts ( const E * excluded)
inline

Definition at line 140 of file SPTree.h.

References dijkstraTT(), myNeededShortcuts, myShortcutsToValidate, and myValidatePermissions.

Referenced by CHBuilder< E, V >::CHInfo::updateShortcuts().

Here is the caller graph for this function:

◆ init()

template<class E, class C>
void SPTree< E, C >::init ( )
inline

Definition at line 68 of file SPTree.h.

References myFound, and myFrontier.

Referenced by dijkstraTT(), and rebuildFrom().

Here is the caller graph for this function:

◆ rebuildFrom()

template<class E, class C>
void SPTree< E, C >::rebuildFrom ( E * start,
const E * excluded )
inline

build a shortest path tree from start to a depth of myMaxdepth. The given edge is excluded from this tree

Definition at line 85 of file SPTree.h.

References init(), myCmp, myFound, myFrontier, and myMaxDepth.

Referenced by CHBuilder< E, V >::CHInfo::updateShortcuts().

Here is the caller graph for this function:

◆ registerForValidation()

template<class E, class C>
void SPTree< E, C >::registerForValidation ( const C * aInfo,
const C * fInfo )
inline

save source/target pair for later validation

Definition at line 132 of file SPTree.h.

References myShortcutsToValidate, and myValidatePermissions.

Referenced by CHBuilder< E, V >::CHInfo::updateShortcuts().

Here is the caller graph for this function:

◆ validatePermissions()

template<class E, class C>
bool SPTree< E, C >::validatePermissions ( )
inline

whether permissions should be validated;

Definition at line 127 of file SPTree.h.

References myValidatePermissions.

Referenced by SPTree(), and CHBuilder< E, V >::CHInfo::updateShortcuts().

Here is the caller graph for this function:

Field Documentation

◆ myCmp

template<class E, class C>
EdgeByTTComparator SPTree< E, C >::myCmp
private

comparator for search queue

Definition at line 223 of file SPTree.h.

Referenced by dijkstraTT(), and rebuildFrom().

◆ myFound

template<class E, class C>
std::vector<E*> SPTree< E, C >::myFound
private

the list of visited edges (used when resetting)

Definition at line 220 of file SPTree.h.

Referenced by debugPrintVector(), dijkstraTT(), init(), and rebuildFrom().

◆ myFrontier

template<class E, class C>
std::vector<E*> SPTree< E, C >::myFrontier
private

the min edge heap

Definition at line 218 of file SPTree.h.

Referenced by dijkstraTT(), init(), and rebuildFrom().

◆ myMaxDepth

template<class E, class C>
int SPTree< E, C >::myMaxDepth
private

maximum search depth

Definition at line 226 of file SPTree.h.

Referenced by dijkstraTT(), rebuildFrom(), and SPTree().

◆ myNeededShortcuts

template<class E, class C>
CHConnectionPairs SPTree< E, C >::myNeededShortcuts
private

vector of needed shortcuts after validation

Definition at line 234 of file SPTree.h.

Referenced by getNeededShortcuts().

◆ myShortcutsToValidate

template<class E, class C>
CHConnectionPairs SPTree< E, C >::myShortcutsToValidate
private

vector of needed shortcuts after validation

Definition at line 232 of file SPTree.h.

Referenced by getNeededShortcuts(), and registerForValidation().

◆ myValidatePermissions

template<class E, class C>
bool SPTree< E, C >::myValidatePermissions
private

whether permissions should be validated

Definition at line 229 of file SPTree.h.

Referenced by getNeededShortcuts(), registerForValidation(), SPTree(), and validatePermissions().


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