-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
Simple Example
for (auto&& [uid, u] : views::vertexlist(g)) {
auto deg = degree(g, u);
}or
for (auto&& u : vertices(g)) {
auto deg = degree(g, u);
}Error
error: no matching function for call to 'degree(std::graph::container::dynamic_graph<double, std::__cxx11::basic_string<char>, void, false, unsigned int, std::graph::container::vofl_graph_traits<double, std::__cxx11::basic_string<char> > >&, std::graph::container::dynamic_vertex<double, std::__cxx11::basic_string<char>, void, false, unsigned int, std::graph::container::vofl_graph_traits<double, std::__cxx11::basic_string<char> > >&)'
72 | auto deg = degree(g, u);
Specifically, in this piece of code:
graph-v2/include/graph/algorithm/pagerank.hpp
Lines 76 to 82 in c6ed28b
| for (auto&& [uid, u] : views::vertexlist(g)) { | |
| // Calculate the degree of each vertex. | |
| size_t edge_cnt = 0; | |
| for (auto&& uv : edges(g, u)) { | |
| ++edge_cnt; | |
| } | |
| degrees[uid] = edge_cnt; |