Vector<T>.Top Method

Returns a vector containing the specified number of elements from the top of the sorted vector.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public virtual Vector<T> Top(
	int count,
	SortOrder sortOrder = SortOrder.Descending
)

Parameters

count  Int32
The number of values to return.
sortOrder  SortOrder  (Optional)
A SortOrder value that specifies whether the elements should be sorted in ascending or descending order.

Return Value

Vector<T>
A vector containing the first count values from the vector when sorted.

See Also