LibreOffice Module sc (master) 1
Public Member Functions | Public Attributes | List of all members
ScMatrix::IterateResultMultiple< tRes > Struct Template Reference

When adding all numerical matrix elements for a scalar result such as summation, the interpreter wants to separate the first non-zero value with the rest of the summed values. More...

#include <scmatrix.hxx>

Public Member Functions

 IterateResultMultiple (size_t nCount)
 

Public Attributes

std::vector< tRes > maAccumulator
 
size_t mnCount
 

Detailed Description

template<typename tRes>
struct ScMatrix::IterateResultMultiple< tRes >

When adding all numerical matrix elements for a scalar result such as summation, the interpreter wants to separate the first non-zero value with the rest of the summed values.

This is necessary for better numerical stability, unless we sort all by absolute values before summing (not really an option) or use another algorithm, e.g. Kahan's summation algorithm, https://en.wikipedia.org/wiki/Kahan_summation_algorithm

Definition at line 133 of file scmatrix.hxx.

Constructor & Destructor Documentation

◆ IterateResultMultiple()

template<typename tRes >
ScMatrix::IterateResultMultiple< tRes >::IterateResultMultiple ( size_t  nCount)
inline

Definition at line 138 of file scmatrix.hxx.

References mnCount, and nCount.

Member Data Documentation

◆ maAccumulator

template<typename tRes >
std::vector<tRes> ScMatrix::IterateResultMultiple< tRes >::maAccumulator

Definition at line 135 of file scmatrix.hxx.

◆ mnCount

template<typename tRes >
size_t ScMatrix::IterateResultMultiple< tRes >::mnCount

Definition at line 136 of file scmatrix.hxx.


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