private List <To> getResolutionByRightDisjunction(int rightIndex) { Disjunction disjunction = (Disjunction)currentEquation.getRight().getChildren()[rightIndex]; To nextEquation = (To)currentEquation.deepCopy(); nextEquation.getRight().getChildren().RemoveAt(rightIndex); nextEquation.getRight().getChildren().InsertRange(rightIndex, new List <INode> { disjunction.getLeft(), disjunction.getRight() }); return(new List <To>() { nextEquation }); }
private List <To> getResolutionByLeftDisjunction(int leftIndex) { Disjunction disjunction = (Disjunction)currentEquation.getLeft().getChildren()[leftIndex]; INode nextLeft = disjunction.getLeft(); INode nextRight = disjunction.getRight(); // In this case we have two children. To nextLeftEquation = (To)currentEquation.deepCopy(); To nextRightEquation = (To)currentEquation.deepCopy(); nextLeftEquation.getLeft().getChildren().RemoveAt(leftIndex); nextRightEquation.getLeft().getChildren().RemoveAt(leftIndex); nextLeftEquation.getLeft().getChildren().Insert(leftIndex, nextLeft); nextRightEquation.getLeft().getChildren().Insert(leftIndex, nextRight); return(new List <To>() { nextLeftEquation, nextRightEquation }); }