Commit f1025e54 authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Fix a bug in binary heap for maximum-product-transversal algorithm in solvers

Thanks to Olga Fuks
parent e2168689
......@@ -114,8 +114,8 @@ public:
if(Array.empty()) return Ret;
Ret = static_cast<INMOST_DATA_ENUM_TYPE>(Array[0]-Base);
Array[0] = Array.back();
Position[Array[0] - Base] = 0;
Array.pop_back();
Position[Array[0]-Base] = 0;
Position[Ret] = ENUMUNDEF;
BalanceHeap(0);
return Ret;
......
......@@ -168,8 +168,8 @@ public:
if(Array.empty()) return Ret;
Ret = static_cast<INMOST_DATA_ENUM_TYPE>(Array[0]-Base);
Array[0] = Array.back();
Position[Array[0] - Base] = 0;
Array.pop_back();
Position[Array[0]-Base] = 0;
Position[Ret] = ENUMUNDEF;
BalanceHeap(0);
return Ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment