graph_analysis
FloydWarshall.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_ALGORITHMS_FLOYD_WARHSHALL_HPP
2 #define GRAPH_ANALYSIS_ALGORITHMS_FLOYD_WARHSHALL_HPP
3 
4 #include "../Edge.hpp"
5 #include "../BaseGraph.hpp"
6 #include "DistanceMatrix.hpp"
7 
8 namespace graph_analysis {
9 namespace algorithms {
10 
11 typedef function1<double, Edge::Ptr> EdgeWeightFunction;
12 
21 {
22  static double getDistanceLazy(DistanceMatrix& distanceMatrix, Vertex::Ptr i, Vertex::Ptr k);
23 public:
31  static DistanceMatrix allShortestPaths(const BaseGraph::Ptr& graph, EdgeWeightFunction edgeWeightFunction, bool detectNegativeCycle = true);
32 };
33 
34 } // end namespace algorithms
35 } // end namespace graph_analysis
36 #endif // GRAPH_ANALYSIS_ALGORITHMS_FLOYD_WARHSHALL_HPP
function1< double, Edge::Ptr > EdgeWeightFunction
Definition: CorrelationClustering.hpp:16
static DistanceMatrix allShortestPaths(const BaseGraph::Ptr &graph, EdgeWeightFunction edgeWeightFunction, bool detectNegativeCycle=true)
Definition: FloydWarshall.cpp:23
std::map< std::pair< Vertex::Ptr, Vertex::Ptr >, double > DistanceMatrix
Definition: DistanceMatrix.hpp:10
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
Implements Floyd-Warshall algorithm.
Definition: FloydWarshall.hpp:20
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
shared_ptr< BaseGraph > Ptr
Definition: BaseGraph.hpp:34