// Make a deep copy of this object public override GroundedClause DeepCopy() { ArithmeticOperation other = (ArithmeticOperation)(this.MemberwiseClone()); other.leftExp = leftExp.DeepCopy(); other.rightExp = rightExp.DeepCopy(); return(other); }
//public Equation(GroundedClause l, GroundedClause r, string just) : base() //{ // lhs = l; // rhs = r; // justification = just; //} public override void Substitute(GroundedClause toFind, GroundedClause toSub) { if (lhs.Equals(toFind)) { lhs = toSub.DeepCopy(); } else { lhs.Substitute(toFind, toSub); } if (rhs.Equals(toFind)) { rhs = toSub.DeepCopy(); } else { rhs.Substitute(toFind, toSub); } }