Stay organized with collections Save and categorize content based on your preferences.

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`

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]