|
tatami_stats
Matrix statistics for tatami
|
Running minima/maxima from sparse data. More...
#include <ranges.hpp>
Public Member Functions | |
| RunningSparse (Index_ num, Output_ *store_min, Output_ *store_max, bool skip_nan, Index_ subtract=0) | |
| void | add (const Value_ *value, const Index_ *index, Index_ number) |
| void | finish () |
Running minima/maxima from sparse data.
Compute running minima and maximuma from sparse data. This does the same as RunningDense but for sparse observed vectors.
| Output_ | Type of the output data. |
| Value_ | Type of the input value. |
| Index_ | Type of the row/column indices. |
|
inline |
| num | Number of objective vectors. | |
| [out] | store_min | Pointer to an output array of length num. After finish() is called, this will contain the minimum for each objective vector. If NULL, no minimum is reported. |
| [out] | store_max | Pointer to an output array of length num. After finish() is called, this will contain the maximum for each objective vector. If NULL, no maximum is reported. |
| skip_nan | See Options::skip_nan for details. | |
| subtract | Offset to subtract from each element of index before using it to index into store. Only relevant if store holds statistics for a contiguous subset of objective vectors, e.g., during task allocation for parallelization. |
|
inline |
Add the next observed vector to the min/max calculation.
| [in] | value | Value of structural non-zero elements. |
| [in] | index | Index of structural non-zero elements. |
| number | Number of non-zero elements in value and index. |
|
inline |
Finish the min/max calculation once all observed vectors have been passed to add().