Table of Contents

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

list IList<float>

The list of values to evaluate.

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

list IList<float>

The list of values to evaluate.

start int

The first index to consider.

end int

The last index to consider.

Returns

float

The median value within the specified range.