OrdinalRankCalculatorTGetTop Method (ICollectionT, ICollectionDouble, Double) |
Get last topPercent 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 public static T[] GetTop(
ICollection<T> objects,
ICollection<double> factor,
double topPercent
)
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. - topPercent
- Type: SystemDouble
Percent of objects to get should be between 0 and 100.
Return Value
Type:
T Last topPercent objects. It may return smaller count of objects if there are not
enough objects with not-NaN values.
Exceptions Exception | Condition |
---|
ArgumentException | Thrown when collections count are not equal. Or percent
parameter are not between 0 and 100. |
See Also