Commit 74c71771 authored by Simon de Givry's avatar Simon de Givry Committed by Thomas Schiex
Browse files

[misc] less verbose for minsum diffusion

parent 7c43b973
// Cmake generated version
#define Toulbar_VERSION "1.0.0-124-ga60cca5-master-tainted (1541602277)"
#define Toulbar_VERSION "1.0.0-125-ga7a18c8-master-tainted (1541759006)"
......@@ -764,9 +764,11 @@ void VACExtension::minsumDiffusion()
for (int times = 0; times < 2; times++) {
bool change = true;
int maxit = ToulBar2::minsumDiffusion;
cout << "MinSumDiffusion: " << endl;
cout << " max iterations " << maxit << endl;
cout << " dual bound = " << std::fixed << std::setprecision(ToulBar2::decimalPoint) << wcsp->getDDualBound() << std::setprecision(DECIMAL_POINT) << endl;
if (ToulBar2::verbose >= 0) {
cout << "MinSumDiffusion: " << endl;
cout << " max iterations " << maxit << endl;
cout << " dual bound = " << std::fixed << std::setprecision(ToulBar2::decimalPoint) << wcsp->getDDualBound() << std::setprecision(DECIMAL_POINT) << endl;
}
int ntimes = 0;
while (change && (ntimes < maxit)) {
change = false;
......@@ -784,7 +786,7 @@ void VACExtension::minsumDiffusion()
ntimes++;
//cout << "it " << ntimes << " changed: " << nchanged << endl;
}
cout << " done iterations: " << ntimes << endl;
if (ToulBar2::verbose >= 0) cout << " done iterations: " << ntimes << endl;
for (unsigned int i = 0; i < wcsp->numberOfVariables(); i++)
if (wcsp->unassigned(i)) {
EnumeratedVariable* evar = (EnumeratedVariable*)wcsp->getVar(i);
......@@ -802,7 +804,7 @@ void VACExtension::minsumDiffusion()
&& !wcsp->getElimTernCtr(i)->isSep())
wcsp->getElimTernCtr(i)->propagate();
wcsp->propagate();
cout << " dual bound = " << std::fixed << std::setprecision(ToulBar2::decimalPoint) << wcsp->getDDualBound() << std::setprecision(DECIMAL_POINT) << endl;
if (ToulBar2::verbose >= 0) cout << " dual bound = " << std::fixed << std::setprecision(ToulBar2::decimalPoint) << wcsp->getDDualBound() << std::setprecision(DECIMAL_POINT) << endl;
// printTightMatrix();
}
}
......
Supports Markdown
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