Click or drag to resize

OrdinalRankCalculatorTGetAscending Method (ICollectionT, ICollectionDouble, Double, Double)

Get objects which has number from startingPercent to endingPercent 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
C#
public static T[] GetAscending(
	ICollection<T> objects,
	ICollection<double> factor,
	double startingPercent,
	double endingPercent
)

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.
startingPercent
Type: SystemDouble
Percent to starting from.
endingPercent
Type: SystemDouble
Percent on which we must stop.

Return Value

Type: T
Objects which has number from startingPercent to endingPercent 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
ExceptionCondition
ArgumentExceptionThrown 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