#include "pgr_allpairs.hpp"
|
size_t | count_rows (const G &graph, const std::vector< std::vector< double > > &matrix) const |
|
void | make_matrix (size_t v_size, std::vector< std::vector< double >> &matrix) const |
|
void | make_result (const G &graph, const std::vector< std::vector< double > > &matrix, size_t &result_tuple_count, Matrix_cell_t **postgres_rows) const |
|
void | make_result (G &graph, std::vector< std::vector< double > > &matrix, std::vector< Matrix_cell_t > &rows) |
|
template<class G>
class Pgr_allpairs< G >
Definition at line 52 of file pgr_allpairs.hpp.
◆ count_rows()
template<class G >
size_t Pgr_allpairs< G >::count_rows |
( |
const G & |
graph, |
|
|
const std::vector< std::vector< double > > & |
matrix |
|
) |
| const |
|
inlineprivate |
Definition at line 217 of file pgr_allpairs.hpp.
220 size_t result_tuple_count = 0;
221 for (
size_t i = 0; i < graph.num_vertices(); i++) {
222 for (
size_t j = 0; j < graph.num_vertices(); j++) {
223 if (i == j)
continue;
224 if (matrix[i][j] != (std::numeric_limits<double>::max)()) {
225 result_tuple_count++;
229 return result_tuple_count;
Referenced by Pgr_allpairs< G >::make_result().
◆ floydWarshall() [1/2]
◆ floydWarshall() [2/2]
◆ johnson() [1/2]
◆ johnson() [2/2]
◆ make_matrix()
template<class G >
void Pgr_allpairs< G >::make_matrix |
( |
size_t |
v_size, |
|
|
std::vector< std::vector< double >> & |
matrix |
|
) |
| const |
|
inlineprivate |
◆ make_result() [1/2]
template<class G >
void Pgr_allpairs< G >::make_result |
( |
const G & |
graph, |
|
|
const std::vector< std::vector< double > > & |
matrix, |
|
|
size_t & |
result_tuple_count, |
|
|
Matrix_cell_t ** |
postgres_rows |
|
) |
| const |
|
inlineprivate |
◆ make_result() [2/2]
template<class G >
void Pgr_allpairs< G >::make_result |
( |
G & |
graph, |
|
|
std::vector< std::vector< double > > & |
matrix, |
|
|
std::vector< Matrix_cell_t > & |
rows |
|
) |
| |
|
inlineprivate |
Definition at line 232 of file pgr_allpairs.hpp.
240 for (
typename G::V v_i = 0; v_i < graph.num_vertices(); v_i++) {
241 for (
typename G::V v_j = 0; v_j < graph.num_vertices(); v_j++) {
242 if (matrix[v_i][v_j] != (std::numeric_limits<double>::max)()) {
244 {graph[v_i].id, graph[v_j].id, matrix[v_i][v_j]};
References Pgr_allpairs< G >::count_rows().
The documentation for this class was generated from the following file: