Ejemplo n.º 1
0
void ParityAggrLit::accept(::Printer *v)
{ 
	Printer *printer = v->output()->printer<Printer>();
	printer->begin(head(), sign_, even_==fixed_, set_);
	foreach(CondLit &lit, conds_) lit.accept(printer);
	printer->end();
}
Ejemplo n.º 2
0
void JunctionAggrLit::accept(::Printer *v)
{
	Printer *printer = v->output()->printer<Printer>();
	printer->begin(head());
	foreach(CondLit &lit, conds_) lit.accept(printer);
	printer->end();
}
Ejemplo n.º 3
0
void MinMaxAggrLit::_accept(::Printer *v)
{
	Printer<MinMaxAggrLit, T> *printer = v->output()->printer<Printer<MinMaxAggrLit, T> >();
	printer->begin(AggrCond::Printer::State(aggrUid(), domain_.lastId()), head(), sign_, complete(), set_);
	if(lower()) { printer->lower(valLower_, lowerEq_); }
	if(upper()) { printer->upper(valUpper_, upperEq_); }
	printer->end();
}
Ejemplo n.º 4
0
void SumAggrLit::accept(::Printer *v)
{ 
	Printer *printer = v->output()->printer<Printer>();
	printer->begin(head(), sign_, set());
	if(lower_.get() || assign_) printer->lower(lowerBound_);
	if(upper_.get() || assign_) printer->upper(upperBound_);
	foreach(CondLit &lit, conds_) lit.accept(printer);
	printer->end();
}
Ejemplo n.º 5
0
 void GlobalConstraint::accept(::Printer *v, Grounder* )
 {
     Printer *printer = v->output()->printer<Printer>();
     printer->type(type_);
     for (size_t i = 0; i < heads_.size(); ++i)
     {
         if ((type_==COUNT || type_==COUNT_UNIQUE)&& i==1)
             printer->beginHead(cmp_);
         else
             printer->beginHead();
         GlobalConstraintHeadLit& h = heads_[i];
         GroundedConstraintVarLitVec vec;
         h.getVariables(vec, v->output()->storage());
         printer->addHead(vec);
         printer->endHead();
     }
     printer->end();
 }