### Profile

Statistics
| Branch: | Revision:

## cool / src / lib / GMLMIP-0.1 / rules / test.cpp @ 7c4d2eb4

 1 ```#include "GML_premise.h" ``` ```#include "bdd.h" ``` ```int main() { ``` ```bdd_init(10000, 1000); ``` ```bdd_setvarnum(100); ``` ```// Create a premise object ``` ```const int n = 1; ``` ```const int m = 1; ``` ```int a[n] = {2}; ``` ```int b[m] = {1}; ``` ```GML_Premise p(n,m,a,b); ``` ```//p.construct_conclusions(); ``` ```//SetOfConclusions s(p.get_n_plus_m(), p.construct_conclusions()); ``` ```/* ``` ```bdd underlying[3]; ``` ```for(int i = 0; i < 3; i++) ``` ```underlying[i] = bdd_ithvarpp(i); ``` ``` ``` ```//bdd_printdot(underlying[0]); ``` ``` ``` ```bdd_printdot(s.get_jth_conclusion(underlying,2)); ``` ```*/ ``` ```vector vec = p.construct_conclusions(); ``` ``` for(unsigned int i=0; i < vec.size(); i++){ ``` ``` cout << "Rule " << i << endl; ``` ``` for(unsigned int j=0; j < vec[i].size(); j++){ ``` ``` cout << "Valuation " << j << ": "; ``` ``` for(int k=0; k < vec[i][j].get_n(); k++){ ``` ``` cout << "p[" << k << "] = " << vec[i][j].get_p_i(k) << ", "; ``` ``` } ``` ``` cout << endl; ``` ``` } ``` ``` cout << "==================" << endl; ``` ```} ``` ```/* Testing new clause/valuation constructor */ ``` ```/* ``` ```for(unsigned int j=0; j < 8; j++){ ``` ``` Clause c(j,3); ``` ``` for(int k=0; k < 3; k++){ ``` ``` cout << "p[" << k << "] = " << c.get_p_i(k) << ", "; ``` ``` } ``` ``` cout << endl; ``` ```} ``` ```*/ ``` ``` ``` ```return 0; ``` ```} ```