diff options
author | Nicolas Courty <ncourty@irisa.fr> | 2020-04-23 13:03:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 13:03:28 +0200 |
commit | ef12867f1425ee86b3cfddef4287b52d46114e83 (patch) | |
tree | 38e023c5561b1669f4d8e602feb6728f51e1b359 /ot/lp/network_simplex_simple.h | |
parent | bacb0b992aa4e1ba7e5fd0beb0bf9617c801f833 (diff) |
[WIP] Issue with sparse emd and adding tests on macos (#158)
* First commit-warning removal
* remove dense feature
* pep8
* pep8
* EMD.h
* pep8 again
* tic toc tolerance
Co-authored-by: RĂ©mi Flamary <remi.flamary@gmail.com>
Diffstat (limited to 'ot/lp/network_simplex_simple.h')
-rw-r--r-- | ot/lp/network_simplex_simple.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ot/lp/network_simplex_simple.h b/ot/lp/network_simplex_simple.h index 498e921..5d93040 100644 --- a/ot/lp/network_simplex_simple.h +++ b/ot/lp/network_simplex_simple.h @@ -875,7 +875,7 @@ namespace lemon { c += Number(it->second) * Number(_cost[it->first]); return c;*/ - for (int i=0; i<_flow.size(); i++) + for (unsigned long i=0; i<_flow.size(); i++) c += _flow[i] * Number(_cost[i]); return c; @@ -1257,7 +1257,7 @@ namespace lemon { u = w; } _pred[u_in] = in_arc; - _forward[u_in] = (u_in == _source[in_arc]); + _forward[u_in] = ((unsigned int)u_in == _source[in_arc]); _succ_num[u_in] = old_succ_num; // Set limits for updating _last_succ form v_in and v_out @@ -1418,7 +1418,6 @@ namespace lemon { template <typename PivotRuleImpl> ProblemType start() { PivotRuleImpl pivot(*this); - double prevCost=-1; ProblemType retVal = OPTIMAL; // Perform heuristic initial pivots |