Class AdjList¶
Adjacency list representation of a network.
#include <adjlist-bones.hpp>
Public Functions¶
| Type | Name |
|---|---|
| AdjList () |
|
| AdjList (const std::vector< int > & source, const std::vector< int > & target, int size, bool directed) Construct a new Adj List object. |
|
| AdjList (AdjList && a) |
|
| AdjList (const AdjList & a) |
|
| size_t | ecount () const Number of edges/arcs/ties in the network. |
| std::vector< std::map< int, int > > & | get_dat () |
| bool | is_directed () consttrue if the network is directed. |
| std::map< int, int > | operator() (epiworld_fast_uint i) const |
| AdjList & | operator= (const AdjList & a) |
| void | print (epiworld_fast_uint limit=20u) const |
| void | read_edgelist (std::string fn, int size, int skip=0, bool directed=true) Read an edgelist. |
| size_t | vcount () const Number of vertices/nodes in the network. |
Public Functions Documentation¶
function AdjList [1/4]¶
function AdjList [2/4]¶
Construct a new Adj List object.
inline AdjList::AdjList (
const std::vector< int > & source,
const std::vector< int > & target,
int size,
bool directed
)
Ids in the network are assume to range from 0 to size - 1.
Parameters:
sourceUnsigned int vector with the sourcetargetUnsigned int vector with the targetsizeNumber of vertices in the network.directedBool true if the network is directed
function AdjList [3/4]¶
function AdjList [4/4]¶
function ecount¶
Number of edges/arcs/ties in the network.
function get_dat¶
function is_directed¶
true if the network is directed.
function operator()¶
function operator=¶
function print¶
function read_edgelist¶
Read an edgelist.
Ids in the network are assume to range from 0 to size - 1.
Parameters:
fnPath to the fileskipNumber of lines to skip (e.g., 1 if there's a header)directedtrueif the network is directedsizeNumber of vertices in the network.
function vcount¶
Number of vertices/nodes in the network.
The documentation for this class was generated from the following file epiworld-src/include/epiworld/adjlist-bones.hpp