Sage Modeling and Simulation Library

Extensions..::..GetValueAtPercentile<(Of <(<'T>)>)> Method

Given a list of source items, and a function that returns a double value for each, this method ascertains the double value that represents the given percentile in that population. For example, given a list of students, and a function that returns their grades, this method will return the grade that represents the 50th percentile across that population of students.

Namespace:  Highpoint.Sage.Mathematics
Assembly:  Sage4 (in Sage4.dll)


public static double GetValueAtPercentile<T>(
	this List<T> srcItems,
	double percentile,
	Func<T, double> valueGetter,
	bool interpolate

Type Parameters

The type of items in the list of source items.


Type: List<(Of <(<'T>)>)>
The source items for which we want to know the percentile.
Type: Double
The percentile on the interval [0.0, 100.0] at which we seek the value from the source items.
Type: Func<(Of <(<'T, Double>)>)>
The function that ascertains the value of each source item.
Type: Boolean
if set to true, we interpolate between located items' values.

Return Value