Beispiel #1
0
int rp_rule_problem_constraint_block(rp_parser p, rp_problem problem)
{
  rp_constraint aux;
  int i;
  if (rp_rule_constraint(p,&aux))
  {
    rp_vector_insert(rp_problem_ctrs(problem),aux);

    /* creation of relation var -> number of constraints containing var */
    for (i=0; i<rp_constraint_arity(aux); ++i)
    {
      ++rp_variable_constrained(rp_problem_var(problem,rp_constraint_var(aux,i)));
    }

    /* tail of the block */
    return( rp_rule_problem_constraint_next(p,problem) );
  }
  else
  {
    return( 0 );
  }
}
Beispiel #2
0
int rp_operator_test::var(int i) const
{
  return( rp_constraint_var(_c,i) );
}