tatami_stats
Matrix statistics for tatami
Loading...
Searching...
No Matches
tatami_stats::VarianceOptions< Output_ > Struct Template Reference

Options for variance(). More...

#include <variance.hpp>

Public Attributes

bool skip_nan = false
 
int num_threads = 1
 
Output_ mean_placeholder = quickstats::nan_if_available_else_zero<Output_>()
 
Output_ variance_placeholder = quickstats::nan_if_available_else_zero<Output_>()
 

Detailed Description

template<typename Output_ = double>
struct tatami_stats::VarianceOptions< Output_ >

Options for variance().

Template Parameters
Output_Floating-point type of the output data.

Member Data Documentation

◆ skip_nan

template<typename Output_ = double>
bool tatami_stats::VarianceOptions< Output_ >::skip_nan = false

Whether to check for NaNs in the input, and skip them. If false, NaNs are assumed to be absent, and the behavior of the variance calculation in the presence of NaNs is undefined.

◆ num_threads

template<typename Output_ = double>
int tatami_stats::VarianceOptions< Output_ >::num_threads = 1

Number of threads to use when computing variances across a tatami::Matrix. See tatami::parallelize() for more details on the parallelization mechanism.

◆ mean_placeholder

template<typename Output_ = double>
Output_ tatami_stats::VarianceOptions< Output_ >::mean_placeholder = quickstats::nan_if_available_else_zero<Output_>()

Placeholder value to use for the mean when the extent of the relevant dimension is zero. This is NaN if supported by Output_, otherwise zero.

◆ variance_placeholder

template<typename Output_ = double>
Output_ tatami_stats::VarianceOptions< Output_ >::variance_placeholder = quickstats::nan_if_available_else_zero<Output_>()

Placeholder value to use for the variance when the extent of the relevant dimension is less than 2. This is NaN if supported by Output_, otherwise zero.


The documentation for this struct was generated from the following file: