|
ModErn Text Analysis
META Enumerates Textual Applications
|
A simple class to represent a directed graph in memory. More...
#include <undirected_graph.h>
Classes | |
| class | directed_graph |
| class | edge_iterator |
| class | node_iterator |
Public Types | |
| using | adjacency_list = typename graph< Node, Edge >::adjacency_list |
| using | vec_t = std::vector< std::pair< Node, adjacency_list >> |
| typedef node_iterator< typename vec_t::iterator > | iterator |
| typedef node_iterator< typename vec_t::const_iterator > | const_iterator |
| typedef edge_iterator< typename vec_t::iterator > | e_iterator |
| typedef edge_iterator< typename vec_t::const_iterator > | const_e_iterator |
Public Types inherited from meta::graph::graph< Node, Edge > | |
| using | adjacency_list = std::vector< std::pair< node_id, Edge >> |
Public Member Functions | |
| const adjacency_list & | adjacent (node_id id) const |
| virtual node_id | insert (Node node) override |
| virtual void | add_edge (Edge edge, node_id source, node_id dest) override |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| e_iterator | edges_begin () |
| const_e_iterator | edges_begin () const |
| e_iterator | edges_end () |
| const_e_iterator | edges_end () const |
Public Member Functions inherited from meta::graph::graph< Node, 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 |
| template<class... Args> | |
| node_id | emplace (Args &&...args) |
| Constructs a node with forwarded arguments. More... | |
| virtual void | add_edge (node_id source, node_id dest) |
| Adds a default edge between the two nodes. More... | |
Static Public Member Functions | |
| static undirected_graph< Node, Edge > | load (const std::string &filename, bool display_errors=false) |
Additional Inherited Members | |
Protected Attributes inherited from meta::graph::graph< Node, Edge > | |
| 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. | |
A simple class to represent a directed graph in memory.
| auto undirected_graph< Node, Edge >::adjacent | ( | node_id | id | ) | const |
| id | The node id to get adjacent nodes to |
|
overridevirtual |
| node | The new object to add into the graph |
Implements meta::graph::graph< Node, Edge >.
|
overridevirtual |
| edge | |
| source | |
| dest |
Implements meta::graph::graph< Node, Edge >.
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
| filename | The file that contains a list of edges in the form "v1 v2" |
| display_errors | Whether to display errors found in the file |
1.8.9.1