Loading...
Searching...
No Matches
casacore::arrays_internal::SumSqrDiff< std::complex< T > > Struct Template Reference

Specialize for complex values. More...

`#include <ElementFunctions.h>`

## Public Member Functions

| SumSqrDiff (std::complex< T > base)
std::complex< T > | operator() (std::complex< T > left, std::complex< T > right) const

## Private Attributes

std::complex< T > | itsBase

## Detailed Description

template<typename T>
struct casacore::arrays_internal::SumSqrDiff< std::complex< T > >

Specialize for complex values.

Variance has to be taken for the absolute value of a complex value. thus sum(abs((a[i] - mean)**2 where the sqrt used in abs and the **2 cancel each other, thus can be left out. See also https://en.wikipedia.org/wiki/Complex_random_variable#Variance Note that although the sum is real, a complex value is used to have equal template types.

Definition at line 239 of file ElementFunctions.h.

## Constructor & Destructor Documentation

## SumSqrDiff()

template<typename T>

casacore::arrays_internal::SumSqrDiff< std::complex< T > >::SumSqrDiff | ( | std::complex< T > | base | ) |

inline explicit

Definition at line 241 of file ElementFunctions.h.

References itsBase.

## Member Function Documentation

## operator()()

template<typename T>

std::complex< T > casacore::arrays_internal::SumSqrDiff< std::complex< T > >::operator() | ( | std::complex< T > | left,
|  | std::complex< T > | right ) const

inline

Definition at line 242 of file ElementFunctions.h.

References itsBase.

## Member Data Documentation

## itsBase

template<typename T>

std::complex<T> casacore::arrays_internal::SumSqrDiff< std::complex< T > >::itsBase

private

Definition at line 246 of file ElementFunctions.h.

Referenced by operator()(), and SumSqrDiff().

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

- casa/Arrays/ElementFunctions.h