|
| template<class... Args> |
| requires std::constructible_from< EdgePropertyT, Args... > void | add_edge (size_t start_node_idx, size_t end_node_idx, Args &&... args) |
| | add an edge to the graph. More...
|
| |
| template<class... Args> |
| requires std::constructible_from< NodePropertyT, Args... > void | add_node (int id, Args &&... args) |
| | add a node to the graph. More...
|
| |
| auto | edges () |
| | range of edges More...
|
| |
| auto | edges () const |
| | range of edges More...
|
| |
| | Graph ()=default |
| |
| template<class... Args> |
| requires std::constructible_from< NodePropertyT, Args... > | Graph (const int number_of_nodes, Args &&... args) |
| | Construct graph without edges, creating each node from the same node_args with default node ids [0, 1, ...]. More...
|
| |
| template<class... Args> |
| requires std::constructible_from< NodePropertyT, Args... > | Graph (const std::vector< int > &node_ids, Args &&... node_args) |
| | Construct graph without edges, creating a node for each id in node_ids from the same node_args. More...
|
| |
| | Graph (const std::vector< int > &node_ids, const std::vector< NodePropertyT > &node_properties) |
| | Construct graph without edges from pairs of node_ids and node_properties. More...
|
| |
| | Graph (std::vector< Node< NodePropertyT >> &&nodes, std::vector< Edge< EdgePropertyT >> &&edges) |
| | Construct graph containing the given nodes and edges. More...
|
| |
| | Graph (std::vector< NodePropertyT > &node_properties) |
| | Construct graph without edges from node_properties with default node ids [0, 1, ...]. More...
|
| |
| auto | nodes () |
| | range of nodes More...
|
| |
| auto | nodes () const |
| | range of nodes More...
|
| |
| auto | out_edges (size_t node_idx) |
| | range of edges going out from a specific node More...
|
| |
| auto | out_edges (size_t node_idx) const |
| | range of edges going out from a specific node More...
|
| |
template<class NodePropertyT , class EdgePropertyT >
template<class... Args>
| requires std::constructible_from<EdgePropertyT, Args...> void mio::Graph< NodePropertyT, EdgePropertyT >::add_edge |
( |
size_t |
start_node_idx, |
|
|
size_t |
end_node_idx, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
add an edge to the graph.
The property of the edge is constructed from arguments.
- Parameters
-
| start_node_idx | id of start node |
| end_node_idx | id of end node |
- Template Parameters
-
| args | additional arguments for edge construction |
If an edge with the same start and end node indices already exists, it is replaced by the newly constructed edge.