|
void | ogdf::parallelFreeSort (const Graph &G, SListPure< edge > &edges) |
| Sorts the edges of G such that parallel edges come after each other in the list. More...
|
|
bool | ogdf::isParallelFree (const Graph &G) |
| Returns true iff G contains no parallel edges. More...
|
|
template<bool ONLY_ONCE = false> |
int | ogdf::numParallelEdges (const Graph &G) |
| Returns the number of parallel edges in G . More...
|
|
template<class EDGELIST > |
void | ogdf::makeParallelFree (Graph &G, EDGELIST ¶llelEdges) |
| Removes all but one of each bundle of parallel edges. More...
|
|
void | ogdf::makeParallelFree (Graph &G) |
| Removes all but one edge of each bundle of parallel edges in G . More...
|
|
void | ogdf::parallelFreeSortUndirected (const Graph &G, SListPure< edge > &edges, EdgeArray< int > &minIndex, EdgeArray< int > &maxIndex) |
| Sorts the edges of G such that undirected parallel edges come after each other in the list. More...
|
|
bool | ogdf::isParallelFreeUndirected (const Graph &G) |
| Returns true iff G contains no undirected parallel edges. More...
|
|
template<bool ONLY_ONCE = false> |
int | ogdf::numParallelEdgesUndirected (const Graph &G) |
| Returns the number of undirected parallel edges in G . More...
|
|
template<class EDGELIST > |
void | ogdf::getParallelFreeUndirected (const Graph &G, EdgeArray< EDGELIST > ¶llelEdges) |
| Computes the bundles of undirected parallel edges in G . More...
|
|
template<class EDGELIST = SListPure<edge>> |
void | ogdf::makeParallelFreeUndirected (Graph &G, EDGELIST *parallelEdges=nullptr, EdgeArray< int > *cardPositive=nullptr, EdgeArray< int > *cardNegative=nullptr) |
| Removes all but one edge of each bundle of undirected parallel edges. More...
|
|
template<class EDGELIST > |
void | ogdf::makeParallelFreeUndirected (Graph &G, EDGELIST ¶llelEdges) |
|
template<class EDGELIST > |
void | ogdf::makeParallelFreeUndirected (Graph &G, EDGELIST ¶llelEdges, EdgeArray< int > &cardPositive, EdgeArray< int > &cardNegative) |
|
Functions dealing with self-loops and multiple (parallel) edges in graphs.
bool ogdf::isParallelFree |
( |
const Graph & |
G | ) |
|
Returns true iff G
contains no parallel edges.
A parallel edge is an edge e1=(v,w) such that there exists another edge e2=(v,w) in the graph. Reversal edges (e.g. (v,w) and (w,v)) are not parallel edges. If you want to test if a graph contains no undirected parallel edges, use isParallelFreeUndirected().
- Parameters
-
- Returns
- true if
G
contains no multi-edges (edges with the same source and target).
void ogdf::makeParallelFree |
( |
Graph & |
G | ) |
|
|
inline |
Removes all but one edge of each bundle of parallel edges in G
.
A parallel edge is an edge e1=(v,w) such that there exists another edge e2=(v,w) in the graph. Reversal edges (e.g. (v,w) and (w,v)) are not parallel edges. If you want to remove parallel and reversal edges, use ogdf::makeParallelFreeUndirected().
- Parameters
-
Definition at line 218 of file simple_graph_alg.h.
template<class EDGELIST >
void ogdf::makeParallelFree |
( |
Graph & |
G, |
|
|
EDGELIST & |
parallelEdges |
|
) |
| |
Removes all but one of each bundle of parallel edges.
A parallel edge is an edge e1=(v,w) such that there exists another edge e2=(v,w) in the graph. Reversal edges (e.g. (v,w) and (w,v)) are not multi-edges. If you want to remove parallel and reversal edges, use ogdf::makeParallelFreeUndirected().
- Template Parameters
-
EDGELIST | is the type of edge list that will be assigned the list of parallel edges. |
- Parameters
-
G | is the input graph. |
parallelEdges | is assigned the list of remaining edges in G that were part of a bundle of parallel edges in the input graph. |
Definition at line 181 of file simple_graph_alg.h.
template<class EDGELIST = SListPure<edge>>
void ogdf::makeParallelFreeUndirected |
( |
Graph & |
G, |
|
|
EDGELIST * |
parallelEdges = nullptr , |
|
|
EdgeArray< int > * |
cardPositive = nullptr , |
|
|
EdgeArray< int > * |
cardNegative = nullptr |
|
) |
| |
Removes all but one edge of each bundle of undirected parallel edges.
An undirected parallel edge is an edge e1=(v,w) such that there exists another edge e2=(v,w) or (w,v) in the graph. This function removes all but one of the edges with endpoints v and w for each unordered pair of nodes {v,w}.
- Template Parameters
-
EDGELIST | is the type of edge list that will be assigned the list of edges. |
- Parameters
-
G | is the input graph. |
parallelEdges | is assigned the list of remaining edges that were part of a bundle of undirected parallel edges in the input graph. |
cardPositive | contains for each edge the number of removed undirected parallel edges pointing in the same direction. |
cardNegative | contains for each edge the number of removed undirected parallel edges pointing in the opposite direction. |
Definition at line 343 of file simple_graph_alg.h.
template<bool ONLY_ONCE = false>
int ogdf::numParallelEdges |
( |
const Graph & |
G | ) |
|
Returns the number of parallel edges in G
.
A parallel edge is an edge e1=(v,w) such that there exists another edge e2=(v,w) in the graph. Reversal edges (e.g. (v,w) and (w,v)) are not parallel edges. If you want to also take reversal edges into account, use numParallelEdgesUndirected().
- Parameters
-
- Template Parameters
-
ONLY_ONCE | Whether the searching for multi-edges should be stopped once a single multi-edge is found. |
- Returns
- is the number of parallel edges: for each bundle of parallel edges between two nodes v and w, all but one are counted.
Definition at line 143 of file simple_graph_alg.h.
template<bool ONLY_ONCE = false>
int ogdf::numParallelEdgesUndirected |
( |
const Graph & |
G | ) |
|
Returns the number of undirected parallel edges in G
.
An undirected parallel edges is an edge e1=(v,w) such that there exists another edge e2=(v,w) or (w,v) in the graph.
- Parameters
-
- Template Parameters
-
ONLY_ONCE | Whether the searching for multi-edges should be stopped once a single multi-edge is found. |
- Returns
- the number of undirected parallel edges; for each unordered pair {v,w} of nodes, all but one of the edges with endpoints v and w (in any order) are counted.
Definition at line 265 of file simple_graph_alg.h.