49template<
typename TCost>
51 for (
node v : G.nodes) {
62template<
typename TCost>
70 while (!
bfs.empty()) {
74 node v = adj->twinNode();
92template<
typename TCost>
94 const Graph& G =
GA.constGraph();
97 for (
edge e : G.edges) {
102 return avgCosts / G.numberOfEdges();
111template<
typename TCost>
114 for (
node v : G.nodes) {
127template<
typename TCost>
142template<
typename TCost>
144 for (
node u : G.nodes) {
145 for (
node v : G.nodes) {
146 for (
node w : G.nodes) {
Declaration and implementation of Array class and Array algorithms.
Pure declaration header, find template implementation in Graph.h.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration and implementation of NodeArray class.
Declaration of singly linked lists and iterators.
Class for adjacency list elements.
Dijkstra's single source shortest path algorithm.
void call(const Graph &G, const EdgeArray< T > &weight, const List< node > &sources, NodeArray< edge > &predecessor, NodeArray< T > &distance, bool directed=false, bool arcsReversed=false, node target=nullptr, T maxLength=std::numeric_limits< T >::max())
Calculates, based on the graph G with corresponding edge costs and source nodes, the shortest paths a...
Dynamic arrays indexed with edges.
Class for the representation of edges.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
Implementation of Dijkstra's single source shortest path algorithm.
void bfs_SPAP(const Graph &G, NodeArray< NodeArray< TCost > > &distance, TCost edgeCosts)
Computes all-pairs shortest paths in G using breadth-first serach (BFS).
void floydWarshall_SPAP(NodeArray< NodeArray< TCost > > &shortestPathMatrix, const Graph &G)
Computes all-pairs shortest paths in graph G using Floyd-Warshall's algorithm.
void bfs_SPSS(node s, const Graph &G, NodeArray< TCost > &distanceArray, TCost edgeCosts)
Computes single-source shortest paths from s in G using breadth-first search (BFS).
void dijkstra_SPSS(node s, const Graph &G, NodeArray< TCost > &shortestPathMatrix, const EdgeArray< TCost > &edgeCosts)
Computes single-source shortest paths from node s in G using Disjkstra's algorithm.
double dijkstra_SPAP(const GraphAttributes &GA, NodeArray< NodeArray< TCost > > &shortestPathMatrix)
Computes all-pairs shortest paths in GA using Dijkstra's algorithm.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
void updateMin(T &min, const T &newValue)
Stores the minimum of min and newValue in min.
The namespace for all OGDF objects.