diff --git a/graph.hpp b/graph.hpp index fd94b2f..26bc311 100644 --- a/graph.hpp +++ b/graph.hpp @@ -79,9 +79,7 @@ public: bool contains(const_reference data) const { return find(data) != m_vertices.end(); } std::vector vertices() const; std::vector neighboursOf(const_reference data) const; - - /// @todo come up with a more clear name - std::vector edgesBetween(const_reference source, const_reference destination) const; + std::vector weightsBetween(const_reference source, const_reference destination) const; std::vector edges() const; // iterators @@ -532,7 +530,7 @@ std::vector::const_pointer> Graph::neig } template -std::vector Graph::edgesBetween(const_reference source, const_reference destination) const +std::vector Graph::weightsBetween(const_reference source, const_reference destination) const { std::vector retval; typename std::vector::const_iterator vertex_it = find(source); diff --git a/main.cpp b/main.cpp index a9d2234..671ce1a 100644 --- a/main.cpp +++ b/main.cpp @@ -44,7 +44,7 @@ int main() assert(g.numberOfEdges() == 1); { - const std::vector eb = g.edgesBetween(2, 5); + const std::vector eb = g.weightsBetween(2, 5); assert(eb.size() == 1); assert(eb[0] == 0); }