$Id$
Here, definitions for the Boost Graph Library and mappings from the BGL to our interface are defined.
When using another graph library as boost as a foundation for this graph library, this is the main place for changes.
#include <string>
#include <map>
#include "boost/graph/adjacency_list.hpp"
#include "Property.hpp"
Include dependency graph for def_graph.hpp:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | gns |
Defines | |
#define | DEBUG 1 |
Set to 1 if debugging, comment out if not debugging. | |
#define | foreach_node(G, n) for(gns::NodeIter __next = (G)->first_node(), (n) = __next++; (n) != (G)->last_node(); (n) = __next, ++__next) |
Loop through each node of the graph. Inside the loop, n is a NodeIter. | |
#define | foreach_edge(G, e) for(gns::EdgeIter __next = (G)->first_edge(), (e) = __next++; (e) != (G)->last_edge(); (e) = __next, ++__next) |
Loop through each edge of the graph. Inside the loop, e is an EdgeIter. | |
#define | foreach_in_edge(G, n, e) for(gns::InEdgeIter __next = (G)->first_in_edge(n), (e) = __next++; (e) != (G)->last_in_edge(n); (e) = __next, ++__next) |
Loop through each incoming edge of the node. Inside the loop, e is an EdgeIter. | |
#define | foreach_out_edge(G, n, e) for(gns::OutEdgeIter __next = (G)->first_out_edge(n), (e) = __next++; (e) != (G)->last_out_edge(n); (e) = __next, ++__next) |
Loop through each outgoing edge of the node. Inside the loop, e is an EdgeIter. | |
Typedefs | |
typedef boost::adjacency_list< boost::listS, boost::listS, boost::bidirectionalS, boost::no_property, boost::no_property, boost::no_property, boost::listS > | Graph_t |
The boost graph type. | |
typedef std::string | NodeID |
NodeID declared as std::string. | |
typedef std::string | EdgeID |
EdgeID declared as std::string. | |
typedef boost::graph_traits< Graph_t >::vertex_descriptor | Node |
Typedef for boost: Node descriptor. | |
typedef boost::graph_traits< Graph_t >::edge_descriptor | Edge |
Typedef for boost: Edge descriptor. | |
typedef boost::graph_traits< Graph_t >::vertex_iterator | NodeIter |
Typedef for boost: node iterator. | |
typedef boost::graph_traits< Graph_t >::edge_iterator | EdgeIter |
Typedef for boost: edge iterator. | |
typedef boost::graph_traits< Graph_t >::out_edge_iterator | OutEdgeIter |
Typedef for boost: outgoing edge iterator. | |
typedef boost::graph_traits< Graph_t >::in_edge_iterator | InEdgeIter |
Typedef for boost: incoming edge iterator. |
|
Set to 1 if debugging, comment out if not debugging.
|
|
Loop through each edge of the graph. Inside the loop, e is an EdgeIter. See foreach_node(). |
|
Loop through each incoming edge of the node. Inside the loop, e is an EdgeIter. See foreach_node(). As there is no means of looping through the in- and outgoing edges of a node in boost, no makro for this functionality exists. |
|
Loop through each node of the graph. Inside the loop, n is a NodeIter.
This is a makro defining a Example: // g is a Graph*, p is a PropertyFacility* foreach_node(g, n) { p->set<int>(*n, "number", 1); p->set<double>(*n, "weight", 0.2); } foreach_node(g, n) std::cout << g->node_id(*n) << std::endl;
__next is an iterator pointing to the next element and should not be used. This enables the user to even delete the node pointed to by n without compromising the continued execution of the loop. |
|
Loop through each outgoing edge of the node. Inside the loop, e is an EdgeIter. See foreach_node(). As there is no means of looping through the in- and outgoing edges of a node in boost, no makro for this functionality exists. |
|
Typedef for boost: Edge descriptor.
|
|
EdgeID declared as std::string.
|
|
Typedef for boost: edge iterator.
|
|
The boost graph type.
|
|
Typedef for boost: incoming edge iterator.
|
|
Typedef for boost: Node descriptor.
|
|
NodeID declared as std::string.
|
|
Typedef for boost: node iterator.
|
|
Typedef for boost: outgoing edge iterator.
|