Click or drag to resize

OrdinalRankCalculatorTGetTop Method (ICollectionT, ICollectionDouble, Int32)

Get last topCount objects from array of objects ascending sorted by factor. Descending order. Minimal factor value gets maximal rank. Maximal factor value gets rank 1.

Namespace:  FinAnalysis.Ranging
Assembly:  FinAnalysis (in FinAnalysis.dll) Version: 2.1.13-cc97e13414b71fde928e8f3a546ac1daf26f295f
Syntax
C#
public static T[] GetTop(
	ICollection<T> objects,
	ICollection<double> factor,
	int topCount
)

Parameters

objects
Type: System.Collections.GenericICollectionT
Collection of objects for ranking.
factor
Type: System.Collections.GenericICollectionDouble
Collection of factor values. factor[i] - value of factor on i-th object.
topCount
Type: SystemInt32
Number of objects to get.

Return Value

Type: T
Last topCount objects. It may return smaller count of objects if there are not enough objects with not-NaN values.
Exceptions
ExceptionCondition
ArgumentExceptionThrown when collections count are not equal. Or if value of topCount is wrong.
See Also