diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2022-09-14 10:52:19 +0200 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2022-09-14 10:52:19 +0200 |
commit | 2f7c87acb04bd9dd3f14a55bb3ba7f1621c25f7c (patch) | |
tree | 1b930e36ada63a7513072a594038b41534be6357 | |
parent | a9eafe47d598b80cd9fd6f0c7d1f56e58ecdc626 (diff) | |
download | code-2f7c87acb04bd9dd3f14a55bb3ba7f1621c25f7c.tar.gz code-2f7c87acb04bd9dd3f14a55bb3ba7f1621c25f7c.tar.bz2 code-2f7c87acb04bd9dd3f14a55bb3ba7f1621c25f7c.zip |
Small simplification.
-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; } - |