|
tatami_stats
Matrix statistics for tatami
|
Functions for computing dimension-wise quantiles. More...
Classes | |
| struct | Options |
| Quantile calculation options. More... | |
Functions | |
| template<typename Value_ , typename Index_ , typename Output_ > | |
| void | apply (bool row, const tatami::Matrix< Value_, Index_ > &mat, const double quantile, Output_ *output, const Options &qopt) |
| template<typename Output_ = double, typename Value_ , typename Index_ > | |
| std::vector< Output_ > | by_column (const tatami::Matrix< Value_, Index_ > &mat, const double quantile, const Options &qopt) |
| template<typename Output_ = double, typename Value_ , typename Index_ > | |
| std::vector< Output_ > | by_row (const tatami::Matrix< Value_, Index_ > &mat, const double quantile, const Options &qopt) |
Functions for computing dimension-wise quantiles.
| void tatami_stats::quantiles::apply | ( | bool | row, |
| const tatami::Matrix< Value_, Index_ > & | mat, | ||
| const double | quantile, | ||
| Output_ * | output, | ||
| const Options & | qopt ) |
Compute quantiles for each element of a chosen dimension of a tatami::Matrix.
| Value_ | Numeric type of the input values. |
| Index_ | Integer type of the row/column indices. |
| Output_ | Floating-point type of the output value. This should be capable of storing NaNs. |
| row | Whether to compute the quantile for each row. If false, the quantile is computed for each column instead. | |
| mat | Instance of a tatami::Matrix. | |
| quantile | Probability of the quantile to compute. This should be in \([0, 1]\). | |
| [out] | output | Pointer to an array of length equal to the number of rows (if row = true) or columns (otherwise). On output, this will contain the row/column quantiles. |
| qopt | Quantile calculation options. |
| std::vector< Output_ > tatami_stats::quantiles::by_column | ( | const tatami::Matrix< Value_, Index_ > & | mat, |
| const double | quantile, | ||
| const Options & | qopt ) |
Wrapper around apply() for column quantiles.
| Output_ | Floating-point type of the output value. This should be capable of storing NaNs. |
| Value_ | Numeric type of the input values. |
| Index_ | Integer type of the row/column indices. |
| mat | Instance of a tatami::Matrix. |
| quantile | Probability of the quantile to compute. This should be in \([0, 1]\). |
| qopt | Quantile calculation options. |
| std::vector< Output_ > tatami_stats::quantiles::by_row | ( | const tatami::Matrix< Value_, Index_ > & | mat, |
| const double | quantile, | ||
| const Options & | qopt ) |
Wrapper around apply() for row quantiles.
| Output_ | Floating-point type of the output value. This should be capable of storing NaNs. |
| Value_ | Numeric type of the input values. |
| Index_ | Integer type of the row/column indices. |
| mat | Instance of a tatami::Matrix. |
| quantile | Probability of the quantile to compute. This should be in \([0, 1]\). |
| qopt | Quantile calculation options. |