Esempio n. 1
0
        // 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);
        }
Esempio n. 2
0
        //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);
            }
        }
Esempio n. 3
0
        //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);
            }
        }