graph-v2 icon indicating copy to clipboard operation
graph-v2 copied to clipboard

`degree(g, u)` no matching function.

Open neoblizz opened this issue 3 years ago • 0 comments

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: https://github.com/stdgraph/graph-v2/blob/c6ed28bdf579c558403a08574b7193e3068321de/include/graph/algorithm/pagerank.hpp#L76-L82 (this is the work around)

neoblizz avatar Dec 11 '22 02:12 neoblizz