C++ Boost

transpose_graph

Graphs: directed (and not undirected)
Properties: vertex ID
Complexity: O(V + E)

(1)
template <class VertexListGraph, class MutableGraph> 
void transpose_graph(const VertexListGraph& G1, MutableGraph& G2);

(2)
template <class VertexListGraph, class MutableGraph, class ID> 
void transpose_graph(const VertexListGraph& G1, MutableGraph& G2, ID id);

Computes the transpose of a directed graph. The transpose of a directed graph G = (V, E)is the graph GT = (V, ET) , where ET = {(v, u) in V x V: (u, v) in E} . i.e., GT is with all its edges reversed.

Graph G2 passed into the algorithm must have the same number of vertices as G1 and no edges. The edges will be added by transpose_graph() by calling add_edge(G2,u,v).

Where Defined

boost/graph/transpose_graph.hpp

Requirements on Types

Complexity

The time complexity is O(V + E).


Copyright © 2000 Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu)