From 2f7c87acb04bd9dd3f14a55bb3ba7f1621c25f7c Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 14 Sep 2022 10:52:19 +0200 Subject: Small simplification. --- rbmp.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rbmp.cpp b/rbmp.cpp index 88bf18b..2b73e59 100644 --- a/rbmp.cpp +++ b/rbmp.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -96,13 +95,12 @@ public: void propagateBeliefs() { for (Edge& e : edges) { for (HalfEdge& h : e.halfedges) { - double Xt = std::numeric_limits::infinity(); + h.X = std::numeric_limits::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; } - -- cgit v1.2.3-70-g09d2