From d73dd4e51e98d359849f4825803a8c417c7edfb5 Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Mon, 13 May 2013 21:06:09 +0200 Subject: [PATCH] edgesBetween renamed to more descriptive weightsBetween --- graph.hpp | 6 ++---- main.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) 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); }