diff options
-rw-r--r-- | rbmp.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,4 +1,3 @@ - #include <iostream> #include <cmath> #include <functional> @@ -96,13 +95,12 @@ public: void propagateBeliefs() { for (Edge& e : edges) { for (HalfEdge& h : e.halfedges) { - double Xt = std::numeric_limits<double>::infinity(); + h.X = std::numeric_limits<double>::infinity(); for (const HalfEdge& hn : h.getHead().neighbors) { if (h.getTail().index != hn.getHead().index) { - Xt = std::min(hn.edge.weight - hn.oldX, Xt); + h.X = std::min(hn.edge.weight - hn.oldX, h.X); } } - h.X = Xt; } } @@ -136,4 +134,3 @@ int main() { return 0; } - |