Method MedianPartition
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
MedianPartition(IList<float>)
Computes the median value of the given list and partitions the list around the median.
[Version(4, 5, 0)]
public static float MedianPartition(this IList<float> list)
Parameters
Returns
- float
The median of the array.
Exceptions
- ArgumentNullException
The list is null.
MedianPartition(IList<float>, int, int)
Computes the median value of the given list within the specified range, and partitions the section around it.
public static float MedianPartition(this IList<float> list, int start, int end)
Parameters
listIList<float>The list of values to evaluate.
startintThe first index to consider.
endintThe last index to consider.
Returns
- float
The median value within the specified range.