|
using | adjacency_list = std::vector< std::pair< node_id, Edge >> |
|
|
virtual Node & | node (node_id id) |
|
virtual const Node & | node (node_id id) const |
|
virtual util::optional< Edge > | edge (node_id source, node_id dest) const |
|
virtual uint64_t | size () const |
|
virtual uint64_t | num_edges () const |
|
virtual node_id | insert (Node node)=0 |
|
template<class... Args> |
node_id | emplace (Args &&...args) |
| Constructs a node with forwarded arguments. More...
|
|
virtual void | add_edge (Edge edge, node_id source, node_id dest)=0 |
|
virtual void | add_edge (node_id source, node_id dest) |
| Adds a default edge between the two nodes. More...
|
|
|
std::vector< std::pair< Node, adjacency_list > > | nodes_ |
| Each Node object is indexed by its id.
|
|
uint64_t | num_edges_ = 0 |
| Saves the number of edges in this graph.
|
|
template<class Node , class Edge >
- Parameters
-
- Returns
- the Node object that the id represents
template<class Node , class Edge >
- Parameters
-
- Returns
- an optional edge connecting source and dest
template<class Node , class Edge >
- Returns
- the size of this graph (number of nodes), which is the range for a valid node_id
template<class Node , class Edge >
- Returns
- the number of edges in the graph
template<class Node, class Edge>
template<class Node , class Edge >
template<class... Args>
Constructs a node with forwarded arguments.
- Returns
- the id of the inserted node
template<class Node, class Edge>
virtual void meta::graph::graph< Node, Edge >::add_edge |
( |
Edge |
edge, |
|
|
node_id |
source, |
|
|
node_id |
dest |
|
) |
| |
|
pure virtual |
template<class Node , class Edge>
Adds a default edge between the two nodes.
- Parameters
-
The documentation for this class was generated from the following files:
- /home/chase/projects/meta/include/graph/graph.h
- /home/chase/projects/meta/include/graph/graph.tcc