|
auto | registerNode (const NodeType &node) -> CounterType |
|
virtual auto | registerEdge (CounterEdge< CounterType, Cost > edge) -> void |
|
virtual auto | modifyEdge (CounterEdge< CounterType, Cost > edge, Cost new_cost) -> std::optional< edge_error > |
|
auto | existEdge (CounterEdge< CounterType, Cost > edge) const -> bool |
|
auto | existBlankEdge (CounterBlankEdge< CounterType > edge) const -> bool |
|
auto | existBlankEdge (CounterEdge< CounterType, Cost > edge) const -> bool |
|
auto | existCounterNode (CounterType node) const -> bool |
|
virtual auto | edges () const -> std::vector< CounterEdge< CounterType, Cost > > |
|
template<VisitOrder v> |
auto | dfs () const -> std::vector< CounterType > |
|
template<VisitOrder v> |
auto | bfs () const -> std::vector< CounterType > |
|
template<VisitOrder v> |
auto | explore_dfs (CounterType from) const -> std::vector< CounterType > |
|
template<VisitOrder v> |
auto | explore_bfs (CounterType from) const -> std::vector< CounterType > |
|
virtual auto | cycles () const -> std::vector< std::vector< CounterType > > |
| INFO: Johnson algorithm.
|
|
virtual auto | singular_shortest_path (CounterType start, CounterType end) const -> std::pair< std::unordered_map< CounterType, Cost >, std::unordered_map< CounterType, CounterType > > |
|
auto | bellman_ford (CounterType start) const -> std::pair< std::unordered_map< CounterType, Cost >, std::unordered_map< CounterType, CounterType > > const |
|
auto | scc () -> std::vector< DiGraph > const |
| INFO: Strongly connected components (SCC)
|
|
template<class NodeType, class Cost, class CounterType, class H>
requires Hashable<NodeType> and std::is_arithmetic_v<Cost>
class lean_graph::DiGraph< NodeType, Cost, CounterType, H >
INFO: A BasicGraph is just a DiGraph that can be multi-edges, with edge-cost being different.
template<class NodeType, class Cost, class CounterType, class H>
auto lean_graph::DiGraph< NodeType, Cost, CounterType, H >::bellman_ford |
( |
CounterType | start | ) |
const -> std::pair<std::unordered_map<CounterType, Cost>,
std::unordered_map<CounterType, CounterType>> const |
|
inlinenodiscard |
INFO: Single source, multi paths bellman ford algorithm User discretion required, user might input negative cost cycles.
Successful bellman ford will contain pair of non empty maps. If you're not a nerd, please be careful
template<class NodeType, class Cost, class CounterType, class H>
virtual auto lean_graph::DiGraph< NodeType, Cost, CounterType, H >::singular_shortest_path |
( |
CounterType | start, |
|
|
CounterType | end ) const -> std::pair<std::unordered_map<CounterType, Cost>,
std::unordered_map<CounterType, CounterType>> |
|
inlinenodiscardvirtual |
INFO: Single source, single path dijkstra algorithm User discretion required, user might input negative cost.
Successful djikstra will contain at least a vector of two nodes. If you're not a nerd, please be careful
Reimplemented in lean_graph::DAG< NodeType, Cost, CounterType, H >.