Compare.Sequence Almost Equal Absolute Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.6
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.6
Overload List
Sequence | Returns whether the values in the specified array are all close to the reference value within the default absolute tolerance. |
Sequence | Returns whether the specified values in the arrays are close to each other within the default absolute tolerance. |
Sequence | Returns whether the values in the specified sequence are all close to the reference value within the default absolute tolerance. |
Sequence | Returns whether the specified values in the sequences are close to each other within the default absolute tolerance. |
Sequence | Returns whether the values in the specified span are all close to the reference value within the default absolute tolerance. |
Sequence | Returns whether the specified values in the spans are close to each other within the default absolute tolerance. |
Sequence | Returns whether the values in the specified array are all close to the reference value within the given absolute tolerance. |
Sequence | Returns whether the specified values in the arrays are close to each other within the given absolute tolerance. |
Sequence | Returns whether the values in the specified sequence are all close to the reference value within the given absolute tolerance. |
Sequence | Returns whether the specified values in the sequences are close to each other within the given absolute tolerance. |
Sequence | Returns whether the values in the specified span are all close to the reference value within the given absolute tolerance. |
Sequence | Returns whether the specified values in the spans are close to each other within the given absolute tolerance. |
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this T[] values,
T referenceValue,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values T[]
- The array of values to compare.
- referenceValue T
- The reference value to compare against.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
SequenceAlmostEqualAbsolute<T>(T[], T[], Boolean, Boolean)
Returns whether the specified values in the arrays are close to each other
within the default absolute tolerance.
public static bool SequenceAlmostEqualAbsolute<T>(
this T[] values,
T[] referenceValues,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values T[]
- The array of values to compare.
- referenceValues T[]
- The array of reference values to compare against.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this IEnumerable<T> values,
T referenceValue,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values IEnumerable<T>
- The sequence of values to compare.
- referenceValue T
- The reference value to compare against.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this IEnumerable<T> values,
IEnumerable<T> referenceValues,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values IEnumerable<T>
- The sequence of values to compare.
- referenceValues IEnumerable<T>
- The sequence of reference values to compare against.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this ReadOnlySpan<T> values,
T referenceValue,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values ReadOnlySpan<T>
- The span of values to compare.
- referenceValue T
- The reference value to compare against.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlySpan<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this ReadOnlySpan<T> values,
ReadOnlySpan<T> referenceValues,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values ReadOnlySpan<T>
- The span of values to compare.
- referenceValues ReadOnlySpan<T>
- The span of reference values to compare against.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlySpan<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this T[] values,
T referenceValue,
T absoluteTolerance,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values T[]
- The array of values to compare.
- referenceValue T
- The reference value to compare against.
- absoluteTolerance T
- Optional. The absolute tolerance.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this T[] values,
T[] referenceValues,
T absoluteTolerance,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values T[]
- The array of values to compare.
- referenceValues T[]
- The array of reference values to compare against.
- absoluteTolerance T
- Optional. The absolute tolerance.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this IEnumerable<T> values,
T referenceValue,
T absoluteTolerance,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values IEnumerable<T>
- The sequence of values to compare.
- referenceValue T
- The reference value to compare against.
- absoluteTolerance T
- Optional. The absolute tolerance.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this IEnumerable<T> values,
IEnumerable<T> referenceValues,
T absoluteTolerance,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values IEnumerable<T>
- The sequence of values to compare.
- referenceValues IEnumerable<T>
- The sequence of reference values to compare against.
- absoluteTolerance T
- Optional. The absolute tolerance.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this ReadOnlySpan<T> values,
T referenceValue,
T absoluteTolerance,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values ReadOnlySpan<T>
- The span of values to compare.
- referenceValue T
- The reference value to compare against.
- absoluteTolerance T
- Optional. The absolute tolerance.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlySpan<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.
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.
public static bool SequenceAlmostEqualAbsolute<T>(
this ReadOnlySpan<T> values,
ReadOnlySpan<T> referenceValues,
T absoluteTolerance,
bool equalNaN = false,
bool equalInfinity = true
)
where T : Object, IComparable<T>
Parameters
- values ReadOnlySpan<T>
- The span of values to compare.
- referenceValues ReadOnlySpan<T>
- The span of reference values to compare against.
- absoluteTolerance T
- Optional. The absolute tolerance.
- equalNaN Boolean (Optional)
- Optional. Specifies whether NaN values are considered equal. The default is false.
- equalInfinity Boolean (Optional)
- Optional. Specifies whether infinite values with the same sign are considered equal. The default is true.
Type Parameters
- T
- The type of the values to compare.
Return Value
Booleantrue if all values are close; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlySpan<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Absolute comparisons are always symmetric.