/// <summary> /// Returns true if this tree is equal to node tree /// </summary> /// <param name="node"></param> /// <returns></returns> public override bool Equals(SymMathNode node) { if (this.GetType() == node.GetType()) { var unaryOperation = node as UnaryOperation; if (unaryOperation != null) { return(A.Equals(unaryOperation.A)); } } return(false); }
/// <summary> /// Returns true if A is symbolically equal to node.A and /// B is symbolically equal to node.B /// </summary> /// <param name="node"></param> /// <returns></returns> public override bool Equals(SymMathNode node) { if (GetType() == node.GetType()) { var binaryOperation = node as BinaryOperation; if (binaryOperation != null) { return(A.Equals(binaryOperation.A) && B.Equals(binaryOperation.B)); } } return(false); }