From 74749114ede17ec1704dd61a8879f55499028f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Wi=C3=9Fmann?= <edu@thorsten-wissmann.de> Date: Wed, 29 Jan 2014 16:22:28 +0100 Subject: [PATCH] Improve onestep-example output --- GMLMIP-0.1/onestep-example.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/GMLMIP-0.1/onestep-example.cpp b/GMLMIP-0.1/onestep-example.cpp index a6ab821..3c66fac 100644 --- a/GMLMIP-0.1/onestep-example.cpp +++ b/GMLMIP-0.1/onestep-example.cpp @@ -73,21 +73,23 @@ int main (int argc, char *argv[]){ cout << vsa.size() << " rules\n"; for (RuleCollection::iterator it = vsa.begin(); it != vsa.end(); ++it) { const set<set<int> > &r = *it; - cout << "\\/("; + bool first = true; + cout << "(\\/ "; for (set<set<int> >::iterator jt = r.begin(); jt != r.end(); ++jt) { const set<int>& clause = *jt; - cout << " /\\("; + if (first) first = false; else cout << "\n "; + cout << "(/\\"; for (set<int>::iterator kt = clause.begin(); kt != clause.end(); ++kt) { int v = *kt; if (v > 0) { - cout << " p" << v; + cout << " p" << v; } else { - cout << " ¬p" << v; + cout << " ¬p" << (-v); } } cout << " )"; } - cout << " )"; + cout << ")"; cout << endl << endl; } f->clear_maps(); -- GitLab