コード例 #1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (!(obj is PiecewisePolynomialResult))
            {
                return(false);
            }
            PiecewisePolynomialResult other = (PiecewisePolynomialResult)obj;

            if (!_coefMatrix.Equals(other._coefMatrix))
            {
                return(false);
            }
            if (_dim != other._dim)
            {
                return(false);
            }
            if (!_knots.Equals(other._knots))
            {
                return(false);
            }
            if (_order != other._order)
            {
                return(false);
            }
            return(true);
        }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (!base.Equals(obj))
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }
            LeastSquareResultsWithTransform other = (LeastSquareResultsWithTransform)obj;

            if (_inverseJacobianModelPararms == null)
            {
                if (other._inverseJacobianModelPararms != null)
                {
                    return(false);
                }
            }
            else if (!_inverseJacobianModelPararms.Equals(other._inverseJacobianModelPararms))
            {
                return(false);
            }
            if (_modelParameters == null)
            {
                if (other._modelParameters != null)
                {
                    return(false);
                }
            }
            else if (!_modelParameters.Equals(other._modelParameters))
            {
                return(false);
            }
            if (_transform == null)
            {
                if (other._transform != null)
                {
                    return(false);
                }
            }
            else if (!_transform.Equals(other._transform))
            {
                return(false);
            }
            return(true);
        }