Exemplo n.º 1
0
 public BooleanVar and(BooleanVar other)
 {
     assertAssignment();
     // lazy and
     return(_bool_value
         ? new BooleanVar(_bool_value && other.getValue(), is_const && other.is_const)
         : new BooleanVar(false, is_const && other.is_const));
 }
Exemplo n.º 2
0
 public BooleanVar xor(BooleanVar other)
 {
     assertAssignment();
     return(new BooleanVar(_bool_value ^ other.getValue(), is_const && other.is_const));
 }
Exemplo n.º 3
0
 public BooleanVar or(BooleanVar other)
 {
     assertAssignment();
     // lazy or
     return(_bool_value ? new BooleanVar(true) : new BooleanVar(_bool_value || other.getValue(), is_const && other.is_const));
 }