Beispiel #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));
 }
Beispiel #2
0
 public BooleanVar xor(BooleanVar other)
 {
     assertAssignment();
     return(new BooleanVar(_bool_value ^ other.getValue(), is_const && other.is_const));
 }
Beispiel #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));
 }