SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions
MAD(filter, constant)

Functions

template<domain D :shared3p >
D float32 MAD (D int32[[1]] data, D bool[[1]] mask, float32 constant)
 
template<domain D :shared3p >
D float64 MAD (D int64[[1]] data, D bool[[1]] mask, float64 constant)
 
template<domain D :shared3p >
D float32 MAD (D float32[[1]] data, D bool[[1]] mask, float32 constant)
 
template<domain D :shared3p >
D float64 MAD (D float64[[1]] data, D bool[[1]] mask, float64 constant)
 

Detailed Description

Find the median absolute deviation of a filtered sample.

Note
D - shared3p protection domain
Supported types - int32 / int64 / float32 / float64
Parameters
data- input sample
mask- mask vector indicating which elements of the input sample to include when computing MAD
constant- scale factor
Returns
returns the median absolute deviation of the filtered input multiplied by the scale factor
Leakage
Leaks the number of true values in the mask

Function Documentation

◆ MAD() [1/4]

D float32 MAD ( D float32[[1]]  data,
D bool[[1]]  mask,
float32  constant 
)

◆ MAD() [2/4]

D float64 MAD ( D float64[[1]]  data,
D bool[[1]]  mask,
float64  constant 
)

◆ MAD() [3/4]

D float32 MAD ( D int32[[1]]  data,
D bool[[1]]  mask,
float32  constant 
)

◆ MAD() [4/4]

D float64 MAD ( D int64[[1]]  data,
D bool[[1]]  mask,
float64  constant 
)