Disable debug output by default in linprog.
This commit is contained in:
@@ -149,7 +149,7 @@ EquationSystem::GaussianElimination()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (swapColumn == -1) {
|
if (swapColumn == -1) {
|
||||||
printf("can't solve column %i\n", i);
|
TRACE("can't solve column %i\n", i);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SwapColumn(i, swapColumn);
|
SwapColumn(i, swapColumn);
|
||||||
@@ -350,7 +350,7 @@ solve(EquationSystem& system)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (negValueCol == -1) {
|
if (negValueCol == -1) {
|
||||||
printf("can't solve\n");
|
TRACE("can't solve\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,7 +371,7 @@ ActiveSetSolver::Solve()
|
|||||||
int32 nVariables = fVariables.CountItems();
|
int32 nVariables = fVariables.CountItems();
|
||||||
|
|
||||||
if (nVariables > nConstraints) {
|
if (nVariables > nConstraints) {
|
||||||
printf("More variables then constraints! vars: %i, constraints: %i\n",
|
TRACE("More variables then constraints! vars: %i, constraints: %i\n",
|
||||||
(int)nVariables, (int)nConstraints);
|
(int)nVariables, (int)nConstraints);
|
||||||
return kInfeasible;
|
return kInfeasible;
|
||||||
}
|
}
|
||||||
@@ -547,7 +547,7 @@ ActiveSetSolver::MinSize(Variable* width, Variable* height)
|
|||||||
if (result == kUnbounded)
|
if (result == kUnbounded)
|
||||||
return kMinSize;
|
return kMinSize;
|
||||||
if (result != kOptimal)
|
if (result != kOptimal)
|
||||||
printf("Could not solve the layout specification (%d). ", result);
|
TRACE("Could not solve the layout specification (%d). ", result);
|
||||||
|
|
||||||
return BSize(width->Value(), height->Value());
|
return BSize(width->Value(), height->Value());
|
||||||
}
|
}
|
||||||
@@ -573,7 +573,7 @@ ActiveSetSolver::MaxSize(Variable* width, Variable* height)
|
|||||||
if (result == kUnbounded)
|
if (result == kUnbounded)
|
||||||
return kMaxSize;
|
return kMaxSize;
|
||||||
if (result != kOptimal)
|
if (result != kOptimal)
|
||||||
printf("Could not solve the layout specification (%d). ", result);
|
TRACE("Could not solve the layout specification (%d). ", result);
|
||||||
|
|
||||||
return BSize(width->Value(), height->Value());
|
return BSize(width->Value(), height->Value());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
using namespace LinearProgramming;
|
using namespace LinearProgramming;
|
||||||
|
|
||||||
|
|
||||||
#define DEBUG_LINEAR_SPECIFICATIONS
|
// #define DEBUG_LINEAR_SPECIFICATIONS
|
||||||
|
|
||||||
#ifdef DEBUG_LINEAR_SPECIFICATIONS
|
#ifdef DEBUG_LINEAR_SPECIFICATIONS
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user