LinqExtensions.Where<T>(Vector<T>, Func<T, Boolean>) Method

Filters the elements of a vector based on a predicate.

Definition

Namespace: Extreme.DataAnalysis.Linq
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static Vector<T> Where<T>(
	this Vector<T> vector,
	Func<T, bool> predicate
)

Parameters

vector  Vector<T>
A vector to filter.
predicate  Func<T, Boolean>
A function to test each element for a condition.

Type Parameters

T
The element type of the vector.

Return Value

Vector<T>
A vector that contains the elements from vector that satisfy the condition.

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

vector is null.

-or-

predicate is null.

See Also