summaryrefslogtreecommitdiff
path: root/ot/lp/EMD_wrapper.cpp
diff options
context:
space:
mode:
authorarolet <antoine.rolet@gmail.com>2017-07-21 13:34:09 +0900
committerarolet <antoine.rolet@gmail.com>2017-07-21 13:34:09 +0900
commitc1980a414c879dd1bc1d8904fd43426326741385 (patch)
tree2513d6ed5ee49d351652e0f989d83cb8298e72fa /ot/lp/EMD_wrapper.cpp
parentdb2a70b1f5146d6374af57f4bea66ab95b202e77 (diff)
Added and passed tests for dual variables
Diffstat (limited to 'ot/lp/EMD_wrapper.cpp')
-rw-r--r--ot/lp/EMD_wrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ot/lp/EMD_wrapper.cpp b/ot/lp/EMD_wrapper.cpp
index c6cbb04..0977e75 100644
--- a/ot/lp/EMD_wrapper.cpp
+++ b/ot/lp/EMD_wrapper.cpp
@@ -101,7 +101,7 @@ void EMD_wrap(int n1, int n2, double *X, double *Y, double *D, double *G,
double flow = net.flow(a);
*cost += flow * (*(D+indI[i]*n2+indJ[j-n]));
*(G+indI[i]*n2+indJ[j-n]) = flow;
- *(alpha + indI[i]) = net.potential(i);
+ *(alpha + indI[i]) = -net.potential(i);
*(beta + indJ[j-n]) = net.potential(j);
}