Template Function lupnt::Percentile

Function Documentation

template<typename T>
T::Scalar lupnt::Percentile(const DenseBase<T> &x, double p)

p-th percentile of a vector/array, computed by sorting the values and indexing at ceil(p * (n-1)).

Used by filters/filter_print.cc to report e.g. the 68th/95th/99th percentile of filter estimation errors.

Parameters:
  • x – Input vector/array

  • p – Percentile as a fraction in [0, 1] (e.g. 0.95 for the 95th percentile)

Returns:

The p-th percentile value of x