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

#include "pgr_linearContraction.hpp"

Public Member Functions

 Pgr_linear ()
 
void calculateVertices (G &graph)
 
void doContraction (G &graph)
 
void setForbiddenVertices (Identifiers< V > forbidden_vertices)
 

Private Types

typedef G::degree_size_type degree_size_type
 
typedef G::E E
 
typedef G::E_i E_i
 
typedef G::EI_i EI_i
 
typedef G::EO_i EO_i
 
typedef G::V V
 
typedef G::V_i V_i
 

Private Member Functions

void add_edge_pair (V vertex, int64_t &incoming_eid, int64_t &outgoing_eid)
 
void add_if_linear (G &graph, V v)
 
void add_shortcut (G &graph, V vertex, E incoming_edge, E outgoing_edge)
 add edges(shortuct) to the graph during contraction More...
 
void add_shortcut (G &graph, pgrouting::CH_edge &shortcut)
 
int64_t get_next_id ()
 
bool is_linear (G &graph, V v)
 

Private Attributes

std::ostringstream debug
 
Identifiers< VforbiddenVertices
 
int64_t last_edge_id
 
Identifiers< VlinearVertices
 

Detailed Description

template<class G>
class pgrouting::contraction::Pgr_linear< G >

Definition at line 46 of file pgr_linearContraction.hpp.

Member Typedef Documentation

template<class G>
typedef G::degree_size_type pgrouting::contraction::Pgr_linear< G >::degree_size_type
private

Definition at line 54 of file pgr_linearContraction.hpp.

template<class G>
typedef G::E pgrouting::contraction::Pgr_linear< G >::E
private

Definition at line 49 of file pgr_linearContraction.hpp.

template<class G>
typedef G::E_i pgrouting::contraction::Pgr_linear< G >::E_i
private

Definition at line 51 of file pgr_linearContraction.hpp.

template<class G>
typedef G::EI_i pgrouting::contraction::Pgr_linear< G >::EI_i
private

Definition at line 53 of file pgr_linearContraction.hpp.

template<class G>
typedef G::EO_i pgrouting::contraction::Pgr_linear< G >::EO_i
private

Definition at line 52 of file pgr_linearContraction.hpp.

template<class G>
typedef G::V pgrouting::contraction::Pgr_linear< G >::V
private

Definition at line 48 of file pgr_linearContraction.hpp.

template<class G>
typedef G::V_i pgrouting::contraction::Pgr_linear< G >::V_i
private

Definition at line 50 of file pgr_linearContraction.hpp.

Constructor & Destructor Documentation

template<class G>
pgrouting::contraction::Pgr_linear< G >::Pgr_linear ( )
inline

Definition at line 58 of file pgr_linearContraction.hpp.

Member Function Documentation

template<class G>
void pgrouting::contraction::Pgr_linear< G >::add_edge_pair ( V  vertex,
int64_t &  incoming_eid,
int64_t &  outgoing_eid 
)
private
template<class G>
void pgrouting::contraction::Pgr_linear< G >::add_if_linear ( G &  graph,
V  v 
)
private
template<class G >
void pgrouting::contraction::Pgr_linear< G >::add_shortcut ( G &  graph,
V  vertex,
E  incoming_edge,
E  outgoing_edge 
)
private

add edges(shortuct) to the graph during contraction

a –incomming–> b —outgoing–> c

a -> c

edge (a, c) is a new edge: shortcut e.contracted_vertices = b + b.contracted vertices b is "removed" disconnected from the graph

  • by removing all edges to/from b

Definition at line 223 of file pgr_linearContraction.hpp.

References pgrouting::CH_edge::add_contracted_edge_vertices(), pgrouting::CH_edge::add_contracted_vertex(), and pgassert.

template<class G >
void pgrouting::contraction::Pgr_linear< G >::add_shortcut ( G &  graph,
pgrouting::CH_edge shortcut 
)
private

Definition at line 266 of file pgr_linearContraction.hpp.

template<class G >
void pgrouting::contraction::Pgr_linear< G >::calculateVertices ( G &  graph)
template<class G >
void pgrouting::contraction::Pgr_linear< G >::doContraction ( G &  graph)
template<class G>
int64_t pgrouting::contraction::Pgr_linear< G >::get_next_id ( )
inlineprivate
template<class G >
bool pgrouting::contraction::Pgr_linear< G >::is_linear ( G &  graph,
V  v 
)
private

Definition at line 99 of file pgr_linearContraction.hpp.

References Identifiers< T >::size().

template<class G >
void pgrouting::contraction::Pgr_linear< G >::setForbiddenVertices ( Identifiers< V forbidden_vertices)

Member Data Documentation

template<class G>
std::ostringstream pgrouting::contraction::Pgr_linear< G >::debug
private

Definition at line 84 of file pgr_linearContraction.hpp.

template<class G>
Identifiers<V> pgrouting::contraction::Pgr_linear< G >::forbiddenVertices
private

Definition at line 81 of file pgr_linearContraction.hpp.

template<class G>
int64_t pgrouting::contraction::Pgr_linear< G >::last_edge_id
private
template<class G>
Identifiers<V> pgrouting::contraction::Pgr_linear< G >::linearVertices
private

Definition at line 80 of file pgr_linearContraction.hpp.


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