C++ Reference: class Percentile

Note: This documentation is automatically generated.

Utility to calculate percentile (First variant) for limited number of records. Reference: https://en.wikipedia.org/wiki/Percentile

After the vector is sorted, we assume that the element with index i correspond to the percentile 100*(i+0.5)/size. For percentiles before the first element (resp. after the last one) we return the first element (resp. the last). And otherwise we do a linear interpolation between the two element around the asked percentile.
Method
AddRecord

Return type: void

Arguments: double record

GetPercentile

Return type: double

Arguments: double percent

Note that this is not fast and runs in O(n log n) for n records.

NumRecords

Return type: int64_t

Returns number of stored records.

Percentile

Return type: explicit

Arguments: int record_limit