|
tatami_stats
Matrix statistics for tatami
|
Running minima/maxima from dense data. More...
#include <ranges.hpp>
Public Member Functions | |
| RunningDense (Index_ num, Output_ *store_min, Output_ *store_max, bool skip_nan) | |
| void | add (const Value_ *ptr) |
| void | finish () |
Running minima/maxima from dense data.
This considers a scenario with a set of equilength "objective" vectors \([v_1, v_2, v_3, ..., v_n]\), but data are only available for "observed" vectors \([p_1, p_2, p_3, ..., p_m]\), where the \(j\)-th element of \(p_i\) is the \(i\)-th element of \(v_j\). The idea is to repeatedly call add() for ptr corresponding to observed vectors from 0 to \(m - 1\), which computes the running minimum/maximum for each objective vector at each invocation.
| Output_ | Type of the output data. |
| Value_ | Type of the input data. |
| Index_ | Type of the row/column indices. |
|
inline |
| num | Number of objective vectors, i.e., \(n\). | |
| [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. |
|
inline |
Add the next observed vector to the running min/max calculation.
| [in] | ptr | Pointer to an array of values of length num, corresponding to an observed vector. |
|
inline |
Finish the running calculation once all observed vectors have been passed to add().