summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbmp.cpp7
1 files 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 <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;
}
-