DenseVector<T>.Top Method

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

Definition

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

Parameters

count  Int32
The number of values to return.
sortOrder  SortOrder
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.

Exceptions

ArgumentOutOfRangeException

count is less than zero.

See Also