pgRouting
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E > Class Template Reference

#include "pgr_contractionGraph.hpp"

Inheritance diagram for pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >:
pgrouting::graph::Pgr_base_graph< G, T_V, T_E >

Public Types

typedef boost::graph_traits< G >
::degree_size_type 
degree_size_type
 
typedef boost::graph_traits< G >
::edge_descriptor 
E
 
typedef boost::graph_traits< G >
::edge_iterator 
E_i
 
typedef boost::graph_traits< G >
::in_edge_iterator 
EI_i
 
typedef boost::graph_traits< G >
::out_edge_iterator 
EO_i
 
typedef std::map< int64_t, Vid_to_V
 
typedef id_to_V::const_iterator LI
 
typedef boost::graph_traits< G >
::vertex_descriptor 
V
 
typedef boost::graph_traits< G >
::vertex_iterator 
V_i
 
Graph related types
Type boost meaning pgRouting meaning
G boost::adjacency_list Graph
V vertex_descriptor Think of it as local ID of a vertex
E edge_descriptor Think of it as local ID of an edge
V_i vertex_iterator To cycle the vertices of the Graph
E_i edge_iterator To cycle the edges of the Graph
EO_i out_edge_iterator To cycle the out going edges of a vertex
EI_i in_edge_iterator To cycle the in coming edges of a vertex (only in bidirectional graphs)
typedef G B_G
 
typedef boost::graph_traits< G >
::vertices_size_type 
vertices_size_type
 
typedef boost::graph_traits< G >
::edges_size_type 
edges_size_type
 

Public Member Functions

 Pgr_contractionGraph (const std::vector< T_V > &vertices, graphType gtype)
 Prepares the graph to be of type gtype with vertices as vertices More...
 
 Pgr_contractionGraph (graphType gtype)
 Prepares the graph to be of type gtype More...
 
void add_contracted_edge_vertices (V v, T_E &e)
 add the contracted vertices of an edge e to the vertex v More...
 
void disconnect_vertex (std::ostringstream &log, V vertex)
 Disconnects all incoming and outgoing edges from the vertex boost::graph doesn't recommend th to insert/remove vertices, so a vertex removal is simulated by disconnecting the vertex from the graph. More...
 
V find_adjacent_vertex (V v) const
 
Identifiers< Vfind_adjacent_vertices (V v) const
 get the vertex descriptors of adjacent vertices of v More...
 
void get_changed_vertices (Identifiers< int64_t > &remaining_vertices)
 get the vertices of the graph with atleast one contracted vertex More...
 
void get_contracted_vertices (std::ostringstream &log, int64_t vid)
 get the contracted vertex ids of a given vertex in string format More...
 
void get_contracted_vertices (int64_t **contracted_vertices, int &contracted_vertices_size, int64_t vid)
 get the contracted vertex ids of a given vertex in string format More...
 
int64_t get_edge_id (V from, V to, double &distance) const
 
void get_ids (std::ostringstream &log, Identifiers< int64_t > boost_ids)
 get the user ids given the boost graph ids in string format More...
 
void get_ids (int64_t **contracted_vertices, int &contracted_vertices_size, Identifiers< int64_t > boost_ids)
 get the user ids given the boost graph ids in array format More...
 
E get_min_cost_edge (V source, V destination)
 get the edge with minimum cost between two vertices More...
 
void get_remaining_vertices (std::vector< T_V > &remaining_vertices)
 get the remaining vertices of the graph after contraction More...
 
void get_shortcuts (std::vector< T_E > &shortcut_edges)
 get the edges of the graph that are added during contraction More...
 
template<typename T >
void graph_add_edge (const T &edge)
 Inserts an edge of type T into the graph. More...
 
void graph_add_edge (const T_E &edge)
 
void graph_add_shortcut (const T_E &edge, std::ostringstream &log)
 add edges(shortuct) to the graph during contraction More...
 
degree_size_type in_degree_from_vertex (V vertex, V neighbor)
 get the in-degree of a vertex from its neighbor More...
 
bool is_connected (int64_t v) const
 True when. More...
 
size_t num_vertices () const
 
T_V & operator[] (V v)
 
T_E & operator[] (E e)
 
T_V operator[] (V v) const
 
degree_size_type out_degree_to_vertex (V vertex, V neighbor)
 get the out-degree of a vertex to its neighbor More...
 
void print_graph (std::ostringstream &log)
 print the graph with contracted vertices of all vertices and edges More...
 
void print_shortcuts (std::ostringstream &log)
 print the edges added during contraction More...
 
template<typename T >
void graph_insert_data (const T *edges, int64_t count)
 Inserts count edges of type T into the graph. More...
 
template<typename T >
void graph_insert_data (const std::vector< T > &edges)
 Inserts vector of edges of type T into the graph. More...
 
boost wrappers
degree_size_type out_degree (int64_t vertex_id) const
 get the out-degree of a vertex More...
 
degree_size_type out_degree (V &v) const
 True when vid is in the graph. More...
 
V get_V (const T_V &vertex)
 get the vertex descriptor of the vertex More...
 
V get_V (int64_t vid) const
 get the vertex descriptor of the vid More...
 
bool has_vertex (int64_t vid) const
 True when vid is in the graph. More...
 
degree_size_type in_degree (V &v) const
 True when vid is in the graph. More...
 
edge disconection/reconnection
void disconnect_edge (int64_t p_from, int64_t p_to)
 Disconnects all edges from p_from to p_to. More...
 
void disconnect_out_going_edge (int64_t vertex_id, int64_t edge_id)
 Disconnects the outgoing edges of a vertex. More...
 
void disconnect_vertex (int64_t p_vertex)
 Disconnects all incoming and outgoing edges from the vertex. More...
 
void disconnect_vertex (V vertex)
 
void restore_graph ()
 Reconnects all edges that were removed. More...
 

Static Public Member Functions

static bool compareById (const T_E &edge1, const T_E &edge2)
 Binary function that accepts two elements , and returns a value convertible to bool. More...
 

Public Attributes

Identifiers< Vremoved_vertices
 
std::vector< T_E > shortcuts
 
The Graph
graph
 The graph. More...
 
size_t m_num_vertices
 local count. More...
 
graphType m_gType
 type (DIRECTED or UNDIRECTED) More...
 
Id mapping handling
id_to_V vertices_map
 id -> graph id More...
 
Graph Modification
std::deque< T_E > removed_edges
 Used for storing the removed_edges. More...
 

Detailed Description

template<class G, typename T_V, typename T_E>
class pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >

Definition at line 58 of file pgr_contractionGraph.hpp.

Member Typedef Documentation

typedef G pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::B_G
inherited

Definition at line 295 of file pgr_base_graph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::degree_size_type pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::degree_size_type

Definition at line 88 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::edge_descriptor pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::E

Definition at line 79 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::edge_iterator pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::E_i

Definition at line 81 of file pgr_contractionGraph.hpp.

typedef boost::graph_traits< G >::edges_size_type pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::edges_size_type
inherited

Definition at line 306 of file pgr_base_graph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::in_edge_iterator pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::EI_i

Definition at line 83 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::out_edge_iterator pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::EO_i

Definition at line 82 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef std::map< int64_t, V > pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::id_to_V

Definition at line 84 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef id_to_V::const_iterator pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::LI

Definition at line 85 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::vertex_descriptor pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::V

Definition at line 78 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
typedef boost::graph_traits< G >::vertex_iterator pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::V_i

Definition at line 80 of file pgr_contractionGraph.hpp.

typedef boost::graph_traits< G >::vertices_size_type pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::vertices_size_type
inherited

Definition at line 304 of file pgr_base_graph.hpp.

Constructor & Destructor Documentation

template<class G , typename T_V , typename T_E >
pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::Pgr_contractionGraph ( const std::vector< T_V > &  vertices,
graphType  gtype 
)
inline

Prepares the graph to be of type gtype with vertices as vertices

Definition at line 100 of file pgr_contractionGraph.hpp.

template<class G , typename T_V , typename T_E >
pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::Pgr_contractionGraph ( graphType  gtype)
inlineexplicit

Prepares the graph to be of type gtype

Definition at line 107 of file pgr_contractionGraph.hpp.

Member Function Documentation

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::add_contracted_edge_vertices ( V  v,
T_E &  e 
)
inline

add the contracted vertices of an edge e to the vertex v

Parameters
[in]vvertex_descriptor
[in]eEdge of type T_E

Definition at line 403 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

template<class G , typename T_V , typename T_E >
static bool pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::compareById ( const T_E &  edge1,
const T_E &  edge2 
)
inlinestatic

Binary function that accepts two elements , and returns a value convertible to bool.

Used as a compare function to sort the edges in increasing order of edge id

Definition at line 93 of file pgr_contractionGraph.hpp.

Referenced by pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_shortcuts().

void pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::disconnect_edge ( int64_t  p_from,
int64_t  p_to 
)
inherited

Disconnects all edges from p_from to p_to.

  • No edge is disconnected if the vertices id's do not exist in the graph
  • All removed edges are stored for future reinsertion
  • All parallel edges are disconnected (automatically by boost)
disconnectEdgeUndirected.png
disconnect_edge(2,3) on an UNDIRECTED graph
disconnectEdgeDirected.png
disconnect_edge(2,3) on a DIRECTED graph
Parameters
[in]p_fromoriginal vertex id of the starting point of the edge
[in]p_tooriginal vertex id of the ending point of the edge
void pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::disconnect_out_going_edge ( int64_t  vertex_id,
int64_t  edge_id 
)
inherited

Disconnects the outgoing edges of a vertex.

  • No edge is disconnected if it doesn't exist in the graph
  • Removed edges are stored for future reinsertion
  • all outgoing edges with the edge_id are removed if they exist
Parameters
[in]vertex_idoriginal vertex
[in]edge_idoriginal edge_id
template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::disconnect_vertex ( std::ostringstream &  log,
V  vertex 
)
inline

Disconnects all incoming and outgoing edges from the vertex boost::graph doesn't recommend th to insert/remove vertices, so a vertex removal is simulated by disconnecting the vertex from the graph.

  • No edge is disconnected if the vertices id's do not exist in the graph
  • All removed edges are stored for future reinsertion
  • All parallel edges are disconnected (automatically by boost)
    Parameters
    [in]vertexoriginal vertex id of the starting point of the edge
    [in]logstring stream used for debugging purposes

Definition at line 494 of file pgr_contractionGraph.hpp.

References DIRECTED, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::m_gType, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::removed_edges, and pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::removed_vertices.

void pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::disconnect_vertex ( int64_t  p_vertex)
inherited

Disconnects all incoming and outgoing edges from the vertex.

boost::graph doesn't recommend th to insert/remove vertices, so a vertex removal is simulated by disconnecting the vertex from the graph

  • No edge is disconnected if the vertices id's do not exist in the graph
  • All removed edges are stored for future reinsertion
  • All parallel edges are disconnected (automatically by boost)
disconnectVertexUndirected.png
disconnect_vertex(2) on an UNDIRECTED graph
disconnectVertexDirected.png
disconnect_vertex(2) on a DIRECTED graph
Parameters
[in]p_vertexoriginal vertex id of the starting point of the edge
void pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::disconnect_vertex ( V  vertex)
inherited
template<class G , typename T_V , typename T_E >
V pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::find_adjacent_vertex ( V  v) const
inline
  • Degree of v is 1
    Parameters
    [in]vvertex_descriptor
    Returns
    V: The vertex descriptor of the vertex adjacent to v

Definition at line 157 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

template<class G , typename T_V , typename T_E >
Identifiers<V> pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::find_adjacent_vertices ( V  v) const
inline

get the vertex descriptors of adjacent vertices of v

Parameters
[in]vvertex_descriptor
Returns
Identifiers<V>: The set of vertex descriptors adjacent to the given vertex v

Definition at line 183 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_changed_vertices ( Identifiers< int64_t > &  remaining_vertices)
inline

get the vertices of the graph with atleast one contracted vertex

Parameters
[in]remaining_verticesThe set of vertices with atleast one contracted vertex

Definition at line 253 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph, Identifiers< T >::has(), and pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::removed_vertices.

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_contracted_vertices ( std::ostringstream &  log,
int64_t  vid 
)
inline

get the contracted vertex ids of a given vertex in string format

Parameters
[in]vidvertex_id
[in]logstringstream which stores the vertex ids of contracted vertices of vid

Definition at line 371 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::get_V(), pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph, and pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::has_vertex().

Referenced by do_pgr_contractGraph().

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_contracted_vertices ( int64_t **  contracted_vertices,
int &  contracted_vertices_size,
int64_t  vid 
)
inline

get the contracted vertex ids of a given vertex in string format

Parameters
[in]vidvertex_id
[in]contracted_verticesThe array of contracted vertices of vid
[in]contracted_vertices_sizeThe size of the array of contracted vertices of vid

Definition at line 387 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::get_V(), pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph, and pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::has_vertex().

int64_t pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::get_edge_id ( V  from,
V  to,
double &  distance 
) const
inherited
template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_ids ( std::ostringstream &  log,
Identifiers< int64_t >  boost_ids 
)
inline

get the user ids given the boost graph ids in string format

Parameters
[in]logstring
[in]boost_idsThe set of boost graph ids of vertices

Definition at line 214 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

Referenced by do_pgr_contractGraph().

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_ids ( int64_t **  contracted_vertices,
int &  contracted_vertices_size,
Identifiers< int64_t >  boost_ids 
)
inline

get the user ids given the boost graph ids in array format

Parameters
[in]boost_idsThe set of boost graph ids of vertices
[in]contracted_verticesThe array of contracted vertices
[in]contracted_vertices_sizeThe size of the array of contracted vertices

Definition at line 228 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph, and Identifiers< T >::size().

template<class G , typename T_V , typename T_E >
E pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_min_cost_edge ( V  source,
V  destination 
)
inline

get the edge with minimum cost between two vertices

Parameters
[in]sourcevertex_descriptor of source vertex
[in]destinationvertex_descriptor of target vertex
Returns
E: The edge descriptor of the edge with minimum cost

Definition at line 279 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_remaining_vertices ( std::vector< T_V > &  remaining_vertices)
inline

get the remaining vertices of the graph after contraction

Parameters
[in]remaining_verticesThe vector of vertices remaining after contraction

Definition at line 242 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph, Identifiers< T >::has(), and pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::removed_vertices.

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::get_shortcuts ( std::vector< T_E > &  shortcut_edges)
inline

get the edges of the graph that are added during contraction

Parameters
[in]shortcut_edgesThe vector of edges added during contraction

Definition at line 265 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::compareById(), and pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::shortcuts.

V pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::get_V ( int64_t  vid) const
inlineinherited

get the vertex descriptor of the vid

Call has_vertex(vid) before calling this function

Returns
V: The vertex descriptor of the vertex

Definition at line 495 of file pgr_base_graph.hpp.

References pgrouting::graph::Pgr_base_graph< G, Vertex, Edge >::has_vertex(), pgassert, and pgrouting::graph::Pgr_base_graph< G, Vertex, Edge >::vertices_map.

template<class G , typename T_V , typename T_E >
template<typename T >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::graph_add_edge ( const T &  edge)
inline
void pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::graph_add_edge ( const T_E &  edge)
inherited
template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::graph_add_shortcut ( const T_E &  edge,
std::ostringstream &  log 
)
inline
template<class G , typename T_V , typename T_E >
template<typename T >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::graph_insert_data ( const T *  edges,
int64_t  count 
)
inline

Inserts count edges of type T into the graph.

Converts the edges to a std::vector<T> & calls the overloaded twin function.

Parameters
edges
count

Definition at line 122 of file pgr_contractionGraph.hpp.

Referenced by do_pgr_contractGraph(), and do_pgr_test_c_edges().

template<class G , typename T_V , typename T_E >
template<typename T >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::graph_insert_data ( const std::vector< T > &  edges)
inline

Inserts vector of edges of type T into the graph.

Parameters
edges

Definition at line 130 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::graph_add_edge().

bool pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::has_vertex ( int64_t  vid) const
inlineinherited
degree_size_type pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::in_degree ( V v) const
inlineinherited
template<class G , typename T_V , typename T_E >
degree_size_type pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::in_degree_from_vertex ( V  vertex,
V  neighbor 
)
inline

get the in-degree of a vertex from its neighbor

Parameters
[in]vertexvertex_descriptor of the given vertex
[in]neighborvertex_descriptor of neighbor
Returns
degree_size_type: The in-degree of vertex from neighbor

Definition at line 304 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

template<class G , typename T_V , typename T_E >
bool pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::is_connected ( int64_t  v) const
inline
size_t pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::num_vertices ( ) const
inlineinherited
template<class G , typename T_V , typename T_E >
T_V& pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::operator[] ( V  v)
inline
template<class G , typename T_V , typename T_E >
T_E& pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::operator[] ( E  e)
inline
T_V pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::operator[] ( V  v) const
inlineinherited
degree_size_type pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::out_degree ( int64_t  vertex_id) const
inlineinherited

get the out-degree of a vertex

Returns
0: The out degree of a vertex that its not in the graph
Parameters
[in]vertex_idoriginal vertex id

Definition at line 463 of file pgr_base_graph.hpp.

References pgrouting::graph::Pgr_base_graph< G, Vertex, Edge >::get_V(), pgrouting::graph::Pgr_base_graph< G, Vertex, Edge >::has_vertex(), and pgrouting::graph::Pgr_base_graph< G, Vertex, Edge >::out_degree().

Referenced by pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::is_connected().

degree_size_type pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::out_degree ( V v) const
inlineinherited

True when vid is in the graph.

Definition at line 511 of file pgr_base_graph.hpp.

References pgrouting::graph::Pgr_base_graph< G, Vertex, Edge >::graph.

template<class G , typename T_V , typename T_E >
degree_size_type pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::out_degree_to_vertex ( V  vertex,
V  neighbor 
)
inline

get the out-degree of a vertex to its neighbor

Parameters
[in]vertexvertex_descriptor of the given vertex
[in]neighborvertex_descriptor of neighbor
Returns
degree_size_type: The out-degree of vertex to neighbor

Definition at line 323 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::graph.

template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::print_graph ( std::ostringstream &  log)
inline
template<class G , typename T_V , typename T_E >
void pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::print_shortcuts ( std::ostringstream &  log)
inline

print the edges added during contraction

Definition at line 340 of file pgr_contractionGraph.hpp.

References pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::shortcuts.

void pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::restore_graph ( )
inherited

Reconnects all edges that were removed.

Member Data Documentation

graphType pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::m_gType
inherited

type (DIRECTED or UNDIRECTED)

Definition at line 329 of file pgr_base_graph.hpp.

Referenced by pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::disconnect_vertex().

size_t pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::m_num_vertices
inherited

local count.

Definition at line 328 of file pgr_base_graph.hpp.

Referenced by pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::print_graph().

std::deque< T_E > pgrouting::graph::Pgr_base_graph< G, T_V , T_E >::removed_edges
inherited

Used for storing the removed_edges.

Definition at line 343 of file pgr_base_graph.hpp.

Referenced by pgrouting::graph::Pgr_contractionGraph< G, T_V, T_E >::disconnect_vertex().


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