Vector.Any Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Any( | Returns whether at least one value in a vector is true. |
Any<T>(Vector<T>, Func<T, Boolean>) | Returns whether at least one value in a vector satisfies a predicate. |
Any<T1, T2>(Vector<T1>, Vector<T2>, Func<T1, T2, Boolean>) | Returns whether all pairs of corresponding values in two vector satisfy the specified predicate. |
Any(Vector<Boolean>)
Returns whether at least one value in a vector is true.
public static bool Any(
this Vector<bool> operand
)
Parameters
Return Value
Booleantrue if at least one element of operand is true; otherwise false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Boolean>. 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).Exceptions
Argument | operand is null. |
Any<T>(Vector<T>, Func<T, Boolean>)
Returns whether at least one value in a vector satisfies a predicate.
public static bool Any<T>(
this Vector<T> operand,
Func<T, bool> predicate
)
Parameters
Type Parameters
- T
- The element type of operand.
Return Value
Booleantrue if predicate returns true for all elements of operand; otherwise false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<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).Exceptions
Argument | operand is null. -or- predicate is null. |
Any<T1, T2>(Vector<T1>, Vector<T2>, Func<T1, T2, Boolean>)
Returns whether all pairs of corresponding values in two vector satisfy
the specified predicate.
public static bool Any<T1, T2>(
Vector<T1> operand1,
Vector<T2> operand2,
Func<T1, T2, bool> predicate
)
Parameters
- operand1 Vector<T1>
- A vector.
- operand2 Vector<T2>
- A vector.
- predicate Func<T1, T2, Boolean>
- The predicate to test.
Type Parameters
- T1
- The element type of operand1.
- T2
- The element type of operand2.
Return Value
Booleantrue if predicate returns true for all elements of operand1 and corresponding elements of operand2; otherwise false.
Exceptions
Argument | operand1 is null. -or- operand2 is null. -or- predicate is null. |
Dimension | operand1 and operand2 do not have the same length. |