Disable debug output by default in linprog.

This commit is contained in:
Alex Wilson
2012-05-03 08:44:44 +12:00
parent 3479e516b7
commit 57d93f836d
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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());
} }
+1 -1
View File
@@ -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>