Compare Class

Provides methods for comparing values with specified tolerances.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.6
C#
public static class Compare
Inheritance
Object  →  Compare

Methods

AlmostEquals<T>(T, T, Boolean, Boolean, Boolean) Returns whether the specified value is close to the reference value within the default absolute and relative tolerances.
AlmostEquals<T>(T, T, T, T, Boolean, Boolean, Boolean) Returns whether the specified value is close to the reference value within the given absolute and relative tolerances.
AlmostEqualsAbsolute<T>(T, T, Boolean, Boolean) Returns whether the specified value is close to the reference value within the default absolute tolerance.
AlmostEqualsAbsolute<T>(T, T, T, Boolean, Boolean) Returns whether the specified value is close to the reference value within the given absolute tolerance.
AlmostEqualsRelative<T>(T, T, Boolean, Boolean, Boolean) Returns whether the specified value is close to the reference value within the default relative tolerance.
AlmostEqualsRelative<T>(T, T, T, Boolean, Boolean, Boolean) Returns whether the specified value is close to the reference value within the given relative tolerance.
AlmostEqualsUlps<T> Returns whether the specified value is close to the reference value within the given tolerance expressed in ULPs (units in the last place).
GetDefaultAbsoluteTolerance<T> Gets the default absolute tolerance to use when comparing numbers for equality.
GetDefaultRelativeTolerance<T> Gets the default relative tolerance to use when comparing numbers for equality.
SequenceAlmostEqual<T>(T[], T, Boolean, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the default absolute and relative tolerances.
SequenceAlmostEqual<T>(T[], T[], Boolean, Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the default absolute and relative tolerances.
SequenceAlmostEqual<T>(IEnumerable<T>, T, Boolean, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the default absolute and relative tolerances.
SequenceAlmostEqual<T>(IEnumerable<T>, IEnumerable<T>, Boolean, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the default absolute and relative tolerances.
SequenceAlmostEqual<T>(ReadOnlySpan<T>, T, Boolean, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the default absolute and relative tolerances.
SequenceAlmostEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the default absolute and relative tolerances.
SequenceAlmostEqual<T>(T[], T, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the given absolute and relative tolerances.
SequenceAlmostEqual<T>(T[], T[], T, T, Boolean, Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the given absolute and relative tolerances.
SequenceAlmostEqual<T>(IEnumerable<T>, T, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the given absolute and relative tolerances.
SequenceAlmostEqual<T>(IEnumerable<T>, IEnumerable<T>, T, T, Boolean, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the given absolute and relative tolerances.
SequenceAlmostEqual<T>(ReadOnlySpan<T>, T, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the given absolute and relative tolerances.
SequenceAlmostEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, T, T, Boolean, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the given absolute and relative tolerances.
SequenceAlmostEqualAbsolute<T>(T[], T, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the default absolute tolerance.
SequenceAlmostEqualAbsolute<T>(T[], T[], Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the default absolute tolerance.
SequenceAlmostEqualAbsolute<T>(IEnumerable<T>, T, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the default absolute tolerance.
SequenceAlmostEqualAbsolute<T>(IEnumerable<T>, IEnumerable<T>, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the default absolute tolerance.
SequenceAlmostEqualAbsolute<T>(ReadOnlySpan<T>, T, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the default absolute tolerance.
SequenceAlmostEqualAbsolute<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the default absolute tolerance.
SequenceAlmostEqualAbsolute<T>(T[], T, T, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the given absolute tolerance.
SequenceAlmostEqualAbsolute<T>(T[], T[], T, Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the given absolute tolerance.
SequenceAlmostEqualAbsolute<T>(IEnumerable<T>, T, T, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the given absolute tolerance.
SequenceAlmostEqualAbsolute<T>(IEnumerable<T>, IEnumerable<T>, T, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the given absolute tolerance.
SequenceAlmostEqualAbsolute<T>(ReadOnlySpan<T>, T, T, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the given absolute tolerance.
SequenceAlmostEqualAbsolute<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, T, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the given absolute tolerance.
SequenceAlmostEqualRelative<T>(T[], T, Boolean, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the default relative tolerance.
SequenceAlmostEqualRelative<T>(T[], T[], Boolean, Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the default relative tolerance.
SequenceAlmostEqualRelative<T>(IEnumerable<T>, T, Boolean, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the default relative tolerance.
SequenceAlmostEqualRelative<T>(IEnumerable<T>, IEnumerable<T>, Boolean, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the default relative tolerance.
SequenceAlmostEqualRelative<T>(ReadOnlySpan<T>, T, Boolean, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the default relative tolerance.
SequenceAlmostEqualRelative<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Boolean, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the default relative tolerance.
SequenceAlmostEqualRelative<T>(T[], T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the given relative tolerance.
SequenceAlmostEqualRelative<T>(T[], T[], T, Boolean, Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the given relative tolerance.
SequenceAlmostEqualRelative<T>(IEnumerable<T>, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the given relative tolerance.
SequenceAlmostEqualRelative<T>(IEnumerable<T>, IEnumerable<T>, T, Boolean, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the given relative tolerance.
SequenceAlmostEqualRelative<T>(ReadOnlySpan<T>, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the given relative tolerance.
SequenceAlmostEqualRelative<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, T, Boolean, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the given relative tolerance.
SequenceAlmostEqualUlps<T>(T[], T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified array are all close to the reference value within the given tolerance expressed in ULPs (units in the last place).
SequenceAlmostEqualUlps<T>(T[], T[], T, Boolean, Boolean, Boolean) Returns whether the specified values in the arrays are close to each other within the given tolerance expressed in ULPs (units in the last place).
SequenceAlmostEqualUlps<T>(IEnumerable<T>, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified sequence are all close to the reference value within the given tolerance expressed in ULPs (units in the last place).
SequenceAlmostEqualUlps<T>(IEnumerable<T>, IEnumerable<T>, T, Boolean, Boolean, Boolean) Returns whether the specified values in the sequences are close to each other within the given tolerance expressed in ULPs (units in the last place).
SequenceAlmostEqualUlps<T>(ReadOnlySpan<T>, T, T, Boolean, Boolean, Boolean) Returns whether the values in the specified span are all close to the reference value within the given tolerance expressed in ULPs (units in the last place).
SequenceAlmostEqualUlps<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, T, Boolean, Boolean, Boolean) Returns whether the specified values in the spans are close to each other within the given tolerance expressed in ULPs (units in the last place).
SetDefaultAbsoluteTolerance<T> Sets the default absolute tolerance to use when comparing numbers for equality.
SetDefaultRelativeTolerance<T> Sets the default relative tolerance to use when comparing numbers for equality.
Ulp<T> Returns the unit in the last place (ULP) of the specified value.

See Also