Axiom.Runtime.AbstractTerm.Assign C# (CSharp) Method

Assign() public method

Assigns this object to another one.
public Assign ( AbstractTerm term ) : void
term AbstractTerm
return void
        public void Assign(AbstractTerm term)
        {
            //if (term._containee == this)
            //{
            //    return;
            //}
            //_containee = term;
            _containee = term.Dereference();
        }

Usage Example

        public override bool Unify(AbstractTerm term)
        {
            if (term.IsReference)
            {
                term.Assign(this);
                return(true);
            }
            if (term.IsStructure)
            {
                if (term.Name != _name || term.Arity != _arity)
                {
                    return(false);
                }

                for (int i = 0; i < _arity; i++)
                {
                    if (!this[i].Unify(term[i]))
                    {
                        return(false);
                    }
                }
                return(true);
            }

            return(false);
        }
All Usage Examples Of Axiom.Runtime.AbstractTerm::Assign