Commit aa73dafb authored by Juan Manuel Perez's avatar Juan Manuel Perez Committed by Vadim Pisarevsky

2 Compile error fix for Win

parent 752d88f5
...@@ -286,7 +286,7 @@ bool EmdL1::greedySolution2() ...@@ -286,7 +286,7 @@ bool EmdL1::greedySolution2()
for(r=0; r<binsDim1; r++) for(r=0; r<binsDim1; r++)
{ {
dFlow = D[r][c]; dFlow = D[r][c];
bUpward = (r<binsDim1-1) && (fabs(dFlow+d2s[c+1]) > fabs(dFlow+d1s[r+1])); // Move upward or right bUpward = (r<binsDim1-1) && (std::abs(dFlow+d2s[c+1]) > std::abs(dFlow+d1s[r+1])); // Move upward or right
// modify basic variables, record BV and related values // modify basic variables, record BV and related values
if(bUpward) if(bUpward)
...@@ -308,7 +308,7 @@ bool EmdL1::greedySolution2() ...@@ -308,7 +308,7 @@ bool EmdL1::greedySolution2()
d2s[c+1] += dFlow; // auxilary matrix maintanence d2s[c+1] += dFlow; // auxilary matrix maintanence
} }
pBV->pParent->pChild = pBV; pBV->pParent->pChild = pBV;
pBV->flow = fabs(dFlow); pBV->flow = std::abs(dFlow);
pBV->iDir = dFlow>0; // 1:outward, 0:inward pBV->iDir = dFlow>0; // 1:outward, 0:inward
} }
...@@ -320,7 +320,7 @@ bool EmdL1::greedySolution2() ...@@ -320,7 +320,7 @@ bool EmdL1::greedySolution2()
pBV = &(m_EdgesUp[r][c]); pBV = &(m_EdgesUp[r][c]);
D[r+1][c] += dFlow; // auxilary matrix maintanence D[r+1][c] += dFlow; // auxilary matrix maintanence
pBV->pParent->pChild= pBV; pBV->pParent->pChild= pBV;
pBV->flow = fabs(dFlow); pBV->flow = std::abs(dFlow);
pBV->iDir = dFlow>0; // 1:outward, 0:inward pBV->iDir = dFlow>0; // 1:outward, 0:inward
} }
return true; return true;
...@@ -393,9 +393,9 @@ bool EmdL1::greedySolution3() ...@@ -393,9 +393,9 @@ bool EmdL1::greedySolution3()
//- determine which direction to move, either right or upward //- determine which direction to move, either right or upward
dFlow = D[i1][i2][i3]; dFlow = D[i1][i2][i3];
f1 = i1<(binsDim1-1)?(float)fabs(double(dFlow+d1s[i1+1])):VHIGH; f1 = (i1<(binsDim1-1))?std::abs(dFlow+d1s[i1+1]):VHIGH;
f2 = i2<(binsDim2-1)?(float)fabs(double(dFlow+d2s[i2+1])):VHIGH; f2 = (i2<(binsDim2-1))?std::abs(dFlow+d2s[i2+1]):VHIGH;
f3 = i3<(binsDim3-1)?(float)fabs(double(dFlow+d3s[i3+1])):VHIGH; f3 = (i3<(binsDim3-1))?std::abs(dFlow+d3s[i3+1]):VHIGH;
if(f1<f2 && f1<f3) if(f1<f2 && f1<f3)
{ {
...@@ -422,7 +422,7 @@ bool EmdL1::greedySolution3() ...@@ -422,7 +422,7 @@ bool EmdL1::greedySolution3()
d3s[i3+1] += dFlow; d3s[i3+1] += dFlow;
} }
pBV->flow = fabs(dFlow); pBV->flow = std::abs(dFlow);
pBV->iDir = dFlow>0; // 1:outward, 0:inward pBV->iDir = dFlow>0; // 1:outward, 0:inward
pBV->pParent->pChild= pBV; pBV->pParent->pChild= pBV;
} }
......
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