This group contains some simple basic graph utilities.
|
| #define | DIGRAPH_TYPEDEFS(Digraph) |
| | Create convenience typedefs for the digraph types and iterators.
|
| #define | TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) |
| | Create convenience typedefs for the digraph types and iterators.
|
| #define | GRAPH_TYPEDEFS(Graph) |
| | Create convenience typedefs for the graph types and iterators.
|
| #define | TEMPLATE_GRAPH_TYPEDEFS(Graph) |
| | Create convenience typedefs for the graph types and iterators.
|
| #define | BPGRAPH_TYPEDEFS(BpGraph) |
| | Create convenience typedefs for the bipartite graph types and iterators.
|
| #define | TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph) |
| | Create convenience typedefs for the bipartite graph types and iterators.
|
|
| template<typename Graph, typename Item> |
| int | countItems (const Graph &g) |
| | Function to count the items in a graph.
|
| template<typename Graph> |
| int | countNodes (const Graph &g) |
| | Function to count the nodes in the graph.
|
| template<typename Graph> |
| int | countRedNodes (const Graph &g) |
| | Function to count the red nodes in the graph.
|
| template<typename Graph> |
| int | countBlueNodes (const Graph &g) |
| | Function to count the blue nodes in the graph.
|
| template<typename Graph> |
| int | countArcs (const Graph &g) |
| | Function to count the arcs in the graph.
|
| template<typename Graph> |
| int | countEdges (const Graph &g) |
| | Function to count the edges in the graph.
|
| template<typename Graph> |
| int | countOutArcs (const Graph &g, const typename Graph::Node &n) |
| | Function to count the number of the out-arcs from node n.
|
| template<typename Graph> |
| int | countInArcs (const Graph &g, const typename Graph::Node &n) |
| | Function to count the number of the in-arcs to node n.
|
| template<typename Graph> |
| int | countIncEdges (const Graph &g, const typename Graph::Node &n) |
| | Function to count the number of the inc-edges to node n.
|
| template<typename GR> |
| bool | undirected (const GR &g) |
| | Check whether a graph is undirected.
|
| template<typename From, typename To> |
| DigraphCopy< From, To > | digraphCopy (const From &from, To &to) |
| | Copy a digraph to another digraph.
|
| template<typename From, typename To> |
| GraphCopy< From, To > | graphCopy (const From &from, To &to) |
| | Copy a graph to another graph.
|
| template<typename From, typename To> |
| BpGraphCopy< From, To > | bpGraphCopy (const From &from, To &to) |
| | Copy a graph to another graph.
|
| template<typename Graph> |
| Graph::Arc | findArc (const Graph &g, typename Graph::Node u, typename Graph::Node v, typename Graph::Arc prev=INVALID) |
| | Find an arc between two nodes of a digraph.
|
| template<typename Graph> |
| Graph::Edge | findEdge (const Graph &g, typename Graph::Node u, typename Graph::Node v, typename Graph::Edge p=INVALID) |
| | Find an edge between two nodes of a graph.
|
| #define DIGRAPH_TYPEDEFS |
( |
| Digraph | ) |
|
This #define creates convenient type definitions for the following types of Digraph: Node, NodeIt, Arc, ArcIt, InArcIt, OutArcIt, BoolNodeMap, IntNodeMap, DoubleNodeMap, BoolArcMap, IntArcMap, DoubleArcMap.
- Note
- If the graph type is a dependent type, ie. the graph type depend on a template parameter, then use
TEMPLATE_DIGRAPH_TYPEDEFS() macro.
| #define BPGRAPH_TYPEDEFS |
( |
| BpGraph | ) |
|
This #define creates the same convenient type definitions as defined by GRAPH_TYPEDEFS(BpGraph) and ten more, namely it creates RedNode, RedNodeIt, BoolRedNodeMap, IntRedNodeMap, DoubleRedNodeMap, BlueNode, BlueNodeIt, BoolBlueNodeMap, IntBlueNodeMap, DoubleBlueNodeMap.
- Note
- If the graph type is a dependent type, ie. the graph type depend on a template parameter, then use
TEMPLATE_BPGRAPH_TYPEDEFS() macro.
template<typename From, typename To>
| DigraphCopy< From, To > digraphCopy |
( |
const From & | from, |
|
|
To & | to ) |
This function copies a digraph to another digraph. The complete usage of it is detailed in the DigraphCopy class, but a short example shows a basic work:
digraphCopy(src, trg).nodeRef(nr).arcCrossRef(acr).run();
DigraphCopy< From, To > digraphCopy(const From &from, To &to)
Copy a digraph to another digraph.
Definition core.h:845
After the copy the nr map will contain the mapping from the nodes of the from digraph to the nodes of the to digraph and acr will contain the mapping from the arcs of the to digraph to the arcs of the from digraph.
- See also
- DigraphCopy
template<typename From, typename To>
| GraphCopy< From, To > graphCopy |
( |
const From & | from, |
|
|
To & | to ) |
This function copies a graph to another graph. The complete usage of it is detailed in the GraphCopy class, but a short example shows a basic work:
graphCopy(src, trg).nodeRef(nr).edgeCrossRef(ecr).run();
GraphCopy< From, To > graphCopy(const From &from, To &to)
Copy a graph to another graph.
Definition core.h:1150
After the copy the nr map will contain the mapping from the nodes of the from graph to the nodes of the to graph and ecr will contain the mapping from the edges of the to graph to the edges of the from graph.
- See also
- GraphCopy
template<typename From, typename To>
| BpGraphCopy< From, To > bpGraphCopy |
( |
const From & | from, |
|
|
To & | to ) |
This function copies a graph to another graph. The complete usage of it is detailed in the BpGraphCopy class, but a short example shows a basic work:
graphCopy(src, trg).nodeRef(nr).edgeCrossRef(ecr).run();
After the copy the nr map will contain the mapping from the nodes of the from graph to the nodes of the to graph and ecr will contain the mapping from the edges of the to graph to the edges of the from graph.
- See also
- BpGraphCopy