|
| Graph (const Graph &)=delete |
|
| Graph (Graph &&)=default |
|
Graph & | operator= (Graph &&)=default |
|
NodeRef | createNode (T &&data) |
| Creates a node and retains ownership of it. More...
|
|
template<class Arg > |
NodeRef | createNode (Arg &&arg) |
|
NodeRef | createNode () |
|
void | moveNode (NodeRef node, Graph< T, U... > *destGraph) |
|
void | moveEdge (EdgeRef edge, Graph< T, U... > *destGraph) |
|
void | moveSubgraph (const Subgraph< T, U... > &subgraph, Graph< T, U... > *destGraph) |
|
bool | isValid () |
|
void | swapNodes (NodeRef n1, NodeRef n2) |
|
void | replaceNode (const NodeRef &oldNode, const NodeRef &newNode) |
| Replace a node in the graph with another node. More...
|
|
void | replaceOutEdges (const NodeRef &oldNode, const NodeRef &newNode) |
|
void | replaceInEdges (const NodeRef &oldNode, const NodeRef &newNode) |
|
EdgeRef | createEdge (NodeRef tail, NodeRef head, U...data) |
| Creates a directed edge and retains ownership of it. More...
|
|
EdgeRef | getEdgeIfExists (NodeRef tail, NodeRef head) const |
| Get a reference to the edge between two nodes if it exists. More...
|
|
bool | hasEdge (NodeRef tail, NodeRef head) const |
| Returns true if there is an edge between the given two nodes.
|
|
bool | hasEdge (EdgeRef e) const |
|
EdgeRef | getEdge (NodeRef tail, NodeRef head) const |
| Get a reference to the edge between two nodes if it exists. More...
|
|
void | deleteNode (NodeRef n) |
| Deletes a node from the graph. More...
|
|
void | deleteNodes (const std::unordered_set< NodeRef > &nodes) |
|
bool | hasNode (NodeRef node) const |
|
void | deleteEdge (EdgeRef e) |
| Deletes a edge from the graph. More...
|
|
const std::vector< NodeRef > | getMutableNodes () |
|
size_t | getNodesCount () const |
|
const std::vector< EdgeRef > | getMutableEdges () |
|
size_t | getEdgesCount () const |
|
template<typename T, typename... U>
class nom::Graph< T, U >
A simple graph implementation.
Everything is owned by the graph to simplify storage concerns.
Definition at line 29 of file Graph.h.