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

            return(Number.AlmostEqualNorm(Norm1(), other.Norm1(), (this - other).Norm1()));
        }
Exemplo n.º 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));
        }