rankWith<T> function

Float64List rankWith<T>(
  1. Iterable<T> values,
  2. num compare(
    1. T a,
    2. T b
    )
)

Returns a Float64List with the competition rank of each element in values according to compare.

Implementation

Float64List rankWith<T>(Iterable<T> values, num Function(T a, T b) compare) {
  final list = values is List<T> ? values : List<T>.of(values, growable: false);
  return _rankWith<T>(list, compare, compareDefined<T>(compare));
}