DataSharp/Mathematics/Vector.cs
/// <summary>
/// Returns true if the given Vector equals to this Vector, otherwise, false.
/// </summary>
/// <param name="that">The given Vector.</param>
/// <param name="epsilon">The minimum positive double value when the program determine whether the difference of 2 scalar is 0 or not.</param>
/// <returns>true if the given Vector equals to this Vector, otherwise, false.</returns>
/// <exception cref="ArgumentNullException">If the input Vector is null.</exception>
Returns true if the given Vector equals to this Vector, otherwise, false.
Returns true if the given Vector equals to this Vector otherwise false .
public bool Equals(Vector that, double epsilon = 1e-5)
        {
            if (that == null)
                return false;
            if (this.Count != that.Count)
                return false;
            for (int i = 0; i < this.Count; i++)
            {
                if (Math.Abs(this[i] - that[i]) > epsilon)
                    return false;
            }
            return true;
        }
public bool Equals ( Vector that , double epsilon = 1e-5 ) { if ( that == null ) return false ; if ( this . Count != that . Count ) return false ; for ( int i = 0 ; i < this . Count ; i ++ ) { if ( Math . Abs ( this [ i ] - that [ i ] ) > epsilon ) return false ; } return true ; }
Returns true if the given Vector equals to this Vector, otherwise, false.
Returns true if the given Vector equals to this Vector otherwise false .
true if the given Vector equals to this Vector, otherwise, false.
true if the given Vector equals to this Vector otherwise false .
If the input Vector is null.
If the input Vector is null .
that
Vector
The given Vector.
The given Vector .
epsilon
double
The minimum positive double value when the program determine whether the difference of 2 scalar is 0 or not.
The minimum positive double value when the program determine whether the difference of 2 scalar is 0 or not .