15 #ifndef PAAL_GRAPH_METRICS_HPP
16 #define PAAL_GRAPH_METRICS_HPP
20 #include <boost/graph/johnson_all_pairs_shortest.hpp>
21 #include <boost/graph/floyd_warshall_shortest.hpp>
22 #include <boost/graph/adjacency_matrix.hpp>
25 namespace data_structures {
27 namespace graph_type {
40 using graph_tag_type = graph_type::sparse_tag;
59 template <
typename Graph,
typename ResultMatrix>
61 boost::johnson_all_pairs_shortest_paths(g, rm);
69 template <
typename Graph,
typename ResultMatrix>
77 boost::floyd_warshall_all_pairs_shortest_paths(g, rm);
92 typename Graph,
typename DistanceType,
93 typename GraphType =
typename graph_metric_traits<Graph>::graph_tag_type>
96 typename graph_metric_traits<Graph>::graph_tag_type> {
99 typename graph_metric_traits<Graph>::graph_tag_type>
GMFBase;
113 template <
typename Graph,
typename DistanceType>
124 template <
typename OutEdgeList,
typename VertexList,
typename Directed,
125 typename VertexProperties,
typename EdgeProperties,
126 typename GraphProperties,
typename EdgeList>
128 boost::adjacency_list<OutEdgeList, VertexList, Directed, VertexProperties,
129 EdgeProperties, GraphProperties, EdgeList>> {
130 typedef graph_type::sparse_tag graph_tag_type;
134 template <
typename Directed,
typename VertexProperty,
typename EdgeProperty,
135 typename GraphProperty,
typename Allocator>
137 Directed, VertexProperty, EdgeProperty, GraphProperty, Allocator>> {
138 typedef graph_type::dense_tag graph_tag_type;
144 #endif // PAAL_GRAPH_METRICS_HPP
Adopts boost graph as Metric.
void fill_matrix(const Graph &g, ResultMatrix &rm)
fill_matrix function
matrix_type m_matrix
matrix with data
type of adjacency_matrix, for given metric
graph_metric(const Graph &g)
constructor
this metric is rectangle_array_metric with N == M.
void fill_matrix(const Graph &g, ResultMatrix &rm)
fill_matrixFunction
graph_metric(const Graph &g)
constructor
generic strategies of computing metric