public new Object Clone() { var op = base.Clone() as IOperator; var init = InitialStep.Clone() as IPlanStep; var goal = GoalStep.Clone() as IPlanStep; return(new Composite(op, init, goal, SubSteps.ToList(), SubOrderings.ToList(), SubLinks.ToList()) { Height = this.Height, NonEqualities = this.NonEqualities }); }
public new Object Clone() { var op = base.Clone() as IOperator; var newSubsteps = new List <IPlanStep>(); foreach (var substep in SubSteps) { var newsubstep = substep.Clone() as IPlanStep; newsubstep.Action = newsubstep.Action.Clone() as Operator; newSubsteps.Add(newsubstep); } // var newinitial = InitialStep.Clone() as IPlanStep; //newinitial.Action = InitialStep.Action.Clone() as Operator; // do same for literals return(new Decomposition(op, Literals, InitialStep.Clone() as IPlanStep, GoalStep.Clone() as IPlanStep, newSubsteps, SubOrderings.ToList(), SubLinks.ToList())); // return new Decomposition(op, Literals, newSubsteps, SubOrderings, SubLinks); }