PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Pgr_ksp< G > Class Template Reference

#include "pgr_ksp.hpp"

Classes

class  compPaths
 

Public Member Functions

void clear ()
 
std::deque< PathYen (G &graph, int64_t source, int64_t target, int K, bool heap_paths)
 

Private Member Functions

void executeYen (G &graph, int top_k)
 the actual algorithm More...
 
Auxiliary function for yen's algorithm
void getFirstSolution (G &graph)
 Performs the first Dijkstra of the algorithm. More...
 
void doNextCycle (G &graph)
 Performs the next cycle of the algorithm. More...
 
void removeVertices (G &graph, const Path &path)
 stores in subPath the first i elements of path More...
 

members

typedef G::V V
 
typedef std::set< Path, compPathspSet
 
V v_source
 source descriptor More...
 
V v_target
 target descriptor More...
 
int64_t m_start
 source id More...
 
int64_t m_end
 target id More...
 
Path curr_result_path
 storage for the current result More...
 
pSet m_ResultSet
 ordered set of shortest paths More...
 
pSet m_Heap
 the heap More...
 
std::ostringstream log
 

Detailed Description

template<class G>
class Pgr_ksp< G >

Definition at line 39 of file pgr_ksp.hpp.

Member Typedef Documentation

template<class G>
typedef std::set<Path, compPaths> Pgr_ksp< G >::pSet
private

Definition at line 114 of file pgr_ksp.hpp.

template<class G>
typedef G::V Pgr_ksp< G >::V
private

Definition at line 106 of file pgr_ksp.hpp.

Member Function Documentation

template<class G >
void Pgr_ksp< G >::clear ( )

Definition at line 33 of file pgr_ksp.cpp.

template<class G >
void Pgr_ksp< G >::doNextCycle ( G &  graph)
private

Performs the next cycle of the algorithm.

Definition at line 108 of file pgr_ksp.cpp.

References Path::appendPath(), Pgr_dijkstra< G >::dijkstra(), and path.

template<class G >
void Pgr_ksp< G >::executeYen ( G &  graph,
int  top_k 
)
private

the actual algorithm

Definition at line 144 of file pgr_ksp.cpp.

template<class G >
void Pgr_ksp< G >::getFirstSolution ( G &  graph)
private

Performs the first Dijkstra of the algorithm.

Definition at line 38 of file pgr_ksp.cpp.

References Pgr_dijkstra< G >::dijkstra(), Path::empty(), and path.

template<class G >
void Pgr_ksp< G >::removeVertices ( G &  graph,
const Path path 
)
private

stores in subPath the first i elements of path

Definition at line 102 of file pgr_ksp.cpp.

template<class G >
std::deque< Path > Pgr_ksp< G >::Yen ( G &  graph,
int64_t  source,
int64_t  target,
int  K,
bool  heap_paths 
)

Definition at line 51 of file pgr_ksp.cpp.

References Path::size().

Referenced by do_pgr_ksp(), do_pgr_withPointsKsp(), and process_ksp().

Member Data Documentation

template<class G>
Path Pgr_ksp< G >::curr_result_path
private

storage for the current result

Definition at line 112 of file pgr_ksp.hpp.

template<class G>
std::ostringstream Pgr_ksp< G >::log
private

Definition at line 118 of file pgr_ksp.hpp.

template<class G>
int64_t Pgr_ksp< G >::m_end
private

target id

Definition at line 110 of file pgr_ksp.hpp.

template<class G>
pSet Pgr_ksp< G >::m_Heap
private

the heap

Definition at line 116 of file pgr_ksp.hpp.

template<class G>
pSet Pgr_ksp< G >::m_ResultSet
private

ordered set of shortest paths

Definition at line 115 of file pgr_ksp.hpp.

template<class G>
int64_t Pgr_ksp< G >::m_start
private

source id

Definition at line 109 of file pgr_ksp.hpp.

template<class G>
V Pgr_ksp< G >::v_source
private

source descriptor

Definition at line 107 of file pgr_ksp.hpp.

template<class G>
V Pgr_ksp< G >::v_target
private

target descriptor

Definition at line 108 of file pgr_ksp.hpp.


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