template<typename Output_, class Iterator_>
class scran_blocks::SingleQuantileVariable< Output_, Iterator_ >
Calculate a single quantile for containers of variable length.
- Template Parameters
-
| Output_ | Floating-point type of the output quantile. |
| Iterator_ | Random-access writeable iterator to a container. |
This class should be constructed once, given the maximum number of elements and the desired probability. It can then be used to compute quantiles from containers of size less than or equal to the maximum. See SingleQuantile for more details.
template<typename Output_ , class Iterator_ >
- Parameters
-
| len | Length of the container. This should be equal to end - begin and no greater than max_len. |
| begin | Start of the container. |
| end | End of the container. |
- Returns
- Quantile for the sequence of elements in
[begin, end). If this sequence is empty, NaN is returned.
The range [begin, end) should have length equal to len, and should not contain any NaN values. On output, the order of elements in [begin, end) may be rearranged.
This method is not thread-safe.
template<typename Output_ , class Iterator_ >
- Parameters
-
| begin | Start of the container. |
| end | End of the container. |
- Returns
- Quantile for the sequence of elements in
[begin, end). If this sequence is empty, NaN is returned.
The range [begin, end) should have length less than max_length, and should not contain any NaN values. On output, the order of elements in [begin, end) may be rearranged.
This method is not thread-safe.