quickstats
Quickly compute simple statistics
Loading...
Searching...
No Matches
quickstats::MadOptions< Output_ > Struct Template Reference

Options for mad() and mad_with_infinities(). More...

#include <mad.hpp>

Public Attributes

Output_ placeholder = nan_if_available_else_zero<Output_>()
 
bool difference_between_infinities_is_zero = false
 

Detailed Description

template<typename Output_ = double>
struct quickstats::MadOptions< Output_ >

Options for mad() and mad_with_infinities().

Template Parameters
Output_Floating-point type of the output value.

Member Data Documentation

◆ placeholder

template<typename Output_ = double>
Output_ quickstats::MadOptions< Output_ >::placeholder = nan_if_available_else_zero<Output_>()

Placeholder value returned by mad() when num_total == 0. This is also returned when median is not finite and MadOptions::difference_between_infinities_is_zero = false.

◆ difference_between_infinities_is_zero

template<typename Output_ = double>
bool quickstats::MadOptions< Output_ >::difference_between_infinities_is_zero = false

Assume that all occurrences of infinity of the same sign refer to the same arbitrarily large number, such that a value of infinity has a deviation of zero from a median of infinity (instead of NaN via usual IEEE arithmetic). This ensures that the MAD will be well-defined for a non-empty array, i.e., either 0 or infinity.


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