Eclipse SUMO - Simulation of Urban MObility
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 More...
 
void registerForValidation (const C *aInfo, const C *fInfo)
 save source/target pair for later validation More...
 
 SPTree (int maxDepth, bool validatePermissions)
 Constructor. More...
 
bool validatePermissions ()
 whether permissions should be validated; More...
 

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 More...
 
std::vector< E * > myFound
 the list of visited edges (used when resetting) More...
 
std::vector< E * > myFrontier
 the min edge heap More...
 
int myMaxDepth
 maximum search depth More...
 
CHConnectionPairs myNeededShortcuts
 vector of needed shortcuts after validation More...
 
CHConnectionPairs myShortcutsToValidate
 vector of needed shortcuts after validation More...
 
bool myValidatePermissions
 whether permissions should be validated More...
 

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.

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 SPTree< E, C >::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 SPTree< E, C >::init(), SPTree< E, C >::myCmp, SPTree< E, C >::myFound, SPTree< E, C >::myFrontier, and SPTree< E, C >::myMaxDepth.

Referenced by SPTree< E, C >::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 SPTree< E, C >::dijkstraTT(), SPTree< E, C >::myNeededShortcuts, SPTree< E, C >::myShortcutsToValidate, and SPTree< E, C >::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 SPTree< E, C >::myFound, and SPTree< E, C >::myFrontier.

Referenced by SPTree< E, C >::dijkstraTT(), and SPTree< E, C >::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 SPTree< E, C >::init(), SPTree< E, C >::myCmp, SPTree< E, C >::myFound, SPTree< E, C >::myFrontier, and SPTree< E, C >::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 SPTree< E, C >::myShortcutsToValidate, and SPTree< E, C >::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 SPTree< E, C >::myValidatePermissions.

Referenced by 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 SPTree< E, C >::dijkstraTT(), and SPTree< E, C >::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 SPTree< E, C >::debugPrintVector(), SPTree< E, C >::dijkstraTT(), SPTree< E, C >::init(), and SPTree< E, C >::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 SPTree< E, C >::dijkstraTT(), SPTree< E, C >::init(), and SPTree< E, C >::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 SPTree< E, C >::dijkstraTT(), and SPTree< E, C >::rebuildFrom().

◆ 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 SPTree< E, C >::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 SPTree< E, C >::getNeededShortcuts(), and SPTree< E, C >::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 SPTree< E, C >::getNeededShortcuts(), SPTree< E, C >::registerForValidation(), and SPTree< E, C >::validatePermissions().


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