示例#1
0
文件: Expr.cs 项目: buptkang/MathCog
        } // TJC: force parenthesis on intersections for readability

        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }
            CompositeExpr ce = (CompositeExpr)obj;

            if (!_head.Equals(ce._head))
            {
                return(false);
            }
            if (_args.Length != ce._args.Length)
            {
                return(false);
            }
            for (int i = 0; i < _args.Length; i++)
            {
                if (!_args[i].Equals(ce._args[i]))
                {
                    return(false);
                }
            }
            return(true);
        }
示例#2
0
文件: Expr.cs 项目: buptkang/MathCog
        public override bool Equals(Object obj)
        {
            if (obj.GetType() != this.GetType())
            {
                return(false);
            }
            WordSym ws = (WordSym)obj;

            return(_word.Equals(ws._word) && _accent.Equals(ws._accent) && _subscript.Equals(ws._subscript) && _format.Equals(ws._format) && ((_tag == null && ws._tag == null) || _tag.Equals(ws._tag)));
        }