public IEnumerable <BooleanExpression> CombineWith(BooleanExpression anotherExpression, BooleanOperation[] ops) { foreach (var op in ops) { yield return(new OpExpression(op, Clone(), anotherExpression.Clone())); yield return(new OpExpression(op, anotherExpression.Clone(), Clone())); } }
static public IEnumerable <TertiaryOpExpression> CombineTertiary(BooleanFunction f, BooleanExpression firstExpression, BooleanExpression anotherExpression, BooleanExpression thirdExpression) { yield return(new TertiaryOpExpression(f, firstExpression.Clone(), anotherExpression.Clone(), thirdExpression.Clone())); yield return(new TertiaryOpExpression(f, firstExpression.Clone(), thirdExpression.Clone(), anotherExpression.Clone())); yield return(new TertiaryOpExpression(f, anotherExpression.Clone(), firstExpression.Clone(), thirdExpression.Clone())); yield return(new TertiaryOpExpression(f, thirdExpression.Clone(), firstExpression.Clone(), anotherExpression.Clone())); yield return(new TertiaryOpExpression(f, anotherExpression.Clone(), thirdExpression.Clone(), firstExpression.Clone())); yield return(new TertiaryOpExpression(f, thirdExpression.Clone(), anotherExpression.Clone(), firstExpression.Clone())); }
public override BooleanExpression Clone() { return(new OpExpression(Op, Left.Clone(), Right.Clone())); }
public IEnumerable<BooleanExpression> CombineWith(BooleanExpression anotherExpression, BooleanOperation[] ops) { foreach(var op in ops) { yield return new OpExpression(op, Clone(), anotherExpression.Clone()); yield return new OpExpression(op, anotherExpression.Clone(), Clone()); } }
public static IEnumerable<TertiaryOpExpression> CombineTertiary(BooleanFunction f, BooleanExpression firstExpression, BooleanExpression anotherExpression, BooleanExpression thirdExpression) { yield return new TertiaryOpExpression(f, firstExpression.Clone(), anotherExpression.Clone(), thirdExpression.Clone()); yield return new TertiaryOpExpression(f, firstExpression.Clone(), thirdExpression.Clone(), anotherExpression.Clone()); yield return new TertiaryOpExpression(f, anotherExpression.Clone(), firstExpression.Clone(), thirdExpression.Clone()); yield return new TertiaryOpExpression(f, thirdExpression.Clone(), firstExpression.Clone(), anotherExpression.Clone()); yield return new TertiaryOpExpression(f, anotherExpression.Clone(), thirdExpression.Clone(), firstExpression.Clone()); yield return new TertiaryOpExpression(f, thirdExpression.Clone(), anotherExpression.Clone(), firstExpression.Clone()); }