コード例 #1
0
 AlmostEqual(
     Vector u,
     Vector v
     )
 {
     return(Number.AlmostEqualNorm(u.Norm1(), v.Norm1(), (u - v).Norm1(), 10 * Number.DefaultRelativeAccuracy));
 }
コード例 #2
0
 AlmostEqual(
     Vector u,
     Vector v,
     double relativeAccuracy
     )
 {
     return(Number.AlmostEqualNorm(u.Norm1(), v.Norm1(), (u - v).Norm1(), relativeAccuracy));
 }
コード例 #3
0
        AlmostEquals(Vector other)
        {
            if (ReferenceEquals(other, null) ||
                _length != other.Length)
            {
                return(false);
            }

            return(Number.AlmostEqualNorm(Norm1(), other.Norm1(), (this - other).Norm1()));
        }
コード例 #4
0
        AlmostEquals(
            Vector other,
            double maximumRelativeError)
        {
            if (ReferenceEquals(other, null) ||
                _length != other.Length)
            {
                return(false);
            }

            return(Number.AlmostEqualNorm(Norm1(), other.Norm1(), (this - other).Norm1(), maximumRelativeError));
        }