Lines Matching refs:num_values
342 void CountingSort(T* values, size_t num_values) { in CountingSort() argument
346 for (size_t i = 0; i < num_values; ++i) { in CountingSort()
367 ABSL_RAW_CHECK(p == values + num_values, "Did not produce enough output"); in CountingSort()
398 const size_t num_values) { in ModeOfSorted() argument
400 size_t half_count = num_values / 2; in ModeOfSorted()
417 T Mode(T* values, const size_t num_values) { in Mode() argument
418 CountingSort(values, num_values); in Mode()
419 return ModeOfSorted(values, num_values); in Mode()
429 T Median(T* values, const size_t num_values) { in Median() argument
430 ABSL_RAW_CHECK(num_values != 0, "Empty input"); in Median()
431 std::sort(values, values + num_values); in Median()
432 const size_t half = num_values / 2; in Median()
434 if (num_values % 2) { in Median()
443 T MedianAbsoluteDeviation(const T* values, const size_t num_values, in MedianAbsoluteDeviation() argument
445 ABSL_RAW_CHECK(num_values != 0, "Empty input"); in MedianAbsoluteDeviation()
447 abs_deviations.reserve(num_values); in MedianAbsoluteDeviation()
448 for (size_t i = 0; i < num_values; ++i) { in MedianAbsoluteDeviation()
452 return Median(abs_deviations.data(), num_values); in MedianAbsoluteDeviation()