inline std::ostream& FileConfig::print(std::ostream& os) const { return os << "bruijn=" << getBruijn() << "\n" << "emch=" << getEmch() << "\n" << "outputFormat=" << getOutputFormat() << "\n" << "fitFilter=" << getFitFilter() << "\n" << "goal=" << getGoal() << "\n" << "info=" << getInfo() << "\n" << "mch=" << getMch() << "\n" << "orderingHeuristicConfig=" << getOrderingHeuristicConfig() << "\n" << "parityBacktrack=" << getParityBacktrack() << "\n" << "parityFilter=" << getParityFilter() << "\n" << "quiet=" << getQuiet() << "\n" << "redundancyFilter=" << getRedundancyFilter() << "\n" << "redundancyFilterFirst=" << getRedundancyFilterFirst() << "\n" << "sample=" << getMonteCarlo() << "\n" << "trace=" << getTrace() << "\n" << "unique=" << getUnique() << "\n" << "volumeBacktrack=" << getVolumeBacktrack() << "\n" << "volumeFilter=" << getVolumeFilter() << std::endl; }
void ManagerArbre::modify(const Arbre & node) { Arbre nodeBdd(node.id()); get(nodeBdd); int idParentBdd = nodeBdd.parent(); int numBdd = nodeBdd.num(); if(node.parent()) { if(nodeBdd.parent() == node.parent()) { int max = fonctionAgrega<int>(bdd::Agrega::Max,Arbre::Num,Arbre::Parent,node.parent()); int num = node.num(); if(num < 0 || num > max) num = max; if(numBdd != num) { nodeBdd.setNum(-numBdd); ManagerSqlArbre::modify(nodeBdd); if(std::abs(numBdd - num) == 1) { Arbre nodeSuivant(num,node.parent()); getUnique(nodeSuivant); nodeSuivant.setNum(numBdd); ManagerSqlArbre::modify(nodeSuivant); } else if(num < numBdd) { ListPtr<Arbre> nodes(getList(Arbre::Parent,node.parent(),Arbre::Num,num,Arbre::Num,numBdd, Arbre::Num,bdd::Condition::Egal,bdd::Condition::SupEgal,bdd::Condition::Inf,false)); for(ListPtr<Arbre>::iterator i = nodes.begin(); i != nodes.end(); ++i) { (*i).setNum((*i).num() + 1); ManagerSqlArbre::modify((*i)); } } else { ListPtr<Arbre> nodes(getList(Arbre::Parent,node.parent(),Arbre::Num,numBdd,Arbre::Num,num, Arbre::Num,bdd::Condition::Egal,bdd::Condition::Sup,bdd::Condition::InfEgal)); for(ListPtr<Arbre>::iterator i = nodes.begin(); i != nodes.end(); ++i) { (*i).setNum((*i).num() - 1); ManagerSqlArbre::modify((*i)); } } nodeBdd.setNum(num); } } else { nodeBdd.setParent(node.parent()); Arbre parent(nodeBdd.parent()); get(parent); if(parent.feuille()) { parent.setFeuille(false); ManagerSqlArbre::modify(parent); nodeBdd.setNum(0); } else { int max = fonctionAgrega<int>(bdd::Agrega::Max,Arbre::Num,Arbre::Parent,node.parent()); if(node.num() < 0 || node.num() > max) nodeBdd.setNum(max + 1); else { ListPtr<Arbre> nodes(getList(Arbre::Parent,node.parent(),Arbre::Num,node.num(), Arbre::Num,bdd::Condition::Egal,bdd::Condition::SupEgal,false)); for(ListPtr<Arbre>::iterator i = nodes.begin(); i != nodes.end(); ++i) { (*i).setNum((*i).num() + 1); ManagerSqlArbre::modify((*i)); } nodeBdd.setNum(node.num()); } } } ManagerSqlArbre::modify(nodeBdd); } else { nodeBdd.setParent(0); nodeBdd.setNum(0); ManagerSqlArbre::modify(nodeBdd); } if(idParentBdd != 0 && idParentBdd != nodeBdd.parent()) { if(exists(Arbre::Parent,idParentBdd)) { ListPtr<Arbre> nodes(getList(Arbre::Parent,idParentBdd,Arbre::Num,numBdd,Arbre::Num,bdd::Condition::Egal,bdd::Condition::Sup)); for(ListPtr<Arbre>::iterator i = nodes.begin(); i != nodes.end(); ++i) { (*i).setNum((*i).num() - 1); ManagerSqlArbre::modify((*i)); } } else { Arbre parent(idParentBdd); get(parent); parent.setFeuille(true); ManagerSqlArbre::modify(parent); } } }