OrdinalRankCalculatorTGetAscending Method (ICollectionT, ICollectionDouble, Int32, Int32) |
Get objects which has number from starting to ending in ascending order.
Ascending order: Maximal factor value gets maximal rank.
Minimal factor value gets rank 1.
Namespace:
FinAnalysis.Ranging
Assembly:
FinAnalysis (in FinAnalysis.dll) Version: 2.1.13-cc97e13414b71fde928e8f3a546ac1daf26f295f
Syntax public static T[] GetAscending(
ICollection<T> objects,
ICollection<double> factor,
int starting,
int ending
)
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. - starting
- Type: SystemInt32
Starting position. - ending
- Type: SystemInt32
Ending position.
Return Value
Type:
T Objects which has number from starting to ending in ascending order. It may return
smaller count of objects if there are not enough objects with not-NaN values. In this case
it will return objects from starting. If count of not-NaN objects smaller than starting method
returns null.
Exceptions Exception | Condition |
---|
ArgumentException | Thrown when collections count are not equal.
Or if starting position greater than ending.
Or if starting or ending position has some wrong value. |
See Also