Vector.Any Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Any(Vector<Boolean>) 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.

Vector.Any(Vector<Boolean>)

Returns whether at least one value in a vector is true.
C#
public static bool Any(
	this Vector<bool> operand
)

Parameters

operand  Vector<Boolean>
A boolean vector.

Return Value

Boolean
true 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

ArgumentNullException

operand is null

Vector.Any<T>(Vector<T>, Func<T, Boolean>)

Returns whether at least one value in a vector satisfies a predicate.
C#
public static bool Any<T>(
	this Vector<T> operand,
	Func<T, bool> predicate
)

Parameters

operand  Vector<T>
A vector.
predicate  Func<T, Boolean>
The predicate to test.

Type Parameters

T
The element type of operand.

Return Value

Boolean
true 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

ArgumentNullException

operand is null

-or-

predicate is null

Vector.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.
C#
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

Boolean
true if predicate returns true for all elements of operand1 and corresponding elements of operand2; otherwise false.

Exceptions

ArgumentNullException

operand1 is null

-or-

operand2 is null

-or-

predicate is null

DimensionMismatchException

operand1 and operand2 do not have the same length.

See Also