tsv_utils.common.numerics

Numeric related utilities used by TSV Utilities.

Utilities in this file:

  • formatNumber - An alternate print format for numbers, especially useful when doubles are being used to represent integer and float values.
  • rangeMedian - Finds the median value of a range.
  • quantile - Generates quantile values for a data set.

Copyright (c) 2016-2020, eBay Inc. Initially written by Jon Degenhardt

Members

Enums

QuantileInterpolation
enum QuantileInterpolation

The different quantile interpolation methods. See: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/quantile.html

Functions

formatNumber
auto formatNumber(T num, size_t floatPrecision)

formatNumber is an alternate way to print numbers. It is especially useful when representing both integral and floating point values with float point data types.

quantile
double quantile(ProbType prob, Range data, QuantileInterpolation method)

Returns the quantile in a data vector for a cumulative probability.

rangeMedian
auto rangeMedian(Range r)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta