LibreOffice Module sc (master)  1
Classes | Typedefs | Functions | Variables
interpr3.cxx File Reference
#include <tools/solar.h>
#include <stdlib.h>
#include <interpre.hxx>
#include <global.hxx>
#include <document.hxx>
#include <dociter.hxx>
#include <matrixoperators.hxx>
#include <scmatrix.hxx>
#include <math.h>
#include <cassert>
#include <memory>
#include <set>
#include <vector>
#include <algorithm>
#include <comphelper/random.hxx>
#include <o3tl/float_int_conversion.hxx>
#include <osl/diagnose.h>
#include <basegfx/numeric/ftools.hxx>
Include dependency graph for interpr3.cxx:

Go to the source code of this file.

Classes

class  ScGammaDistFunction
 
class  ScBetaDistFunction
 
class  ScTDistFunction
 
class  ScFDistFunction
 
class  ScChiDistFunction
 
class  ScChiSqDistFunction
 

Typedefs

using ScMatrixGenerator = ScMatrixRef(SCSIZE, SCSIZE, std::vector< double > &)
 

Functions

static size_t MAX_COUNT_DOUBLE_FOR_SORT (const ScSheetLimits &rSheetLimits)
 Two columns of data should be sortable with GetSortArray() and QuickSort() More...
 
static bool lcl_HasChangeOfSign (double u, double w)
 u*w<0.0 fails for values near zero More...
 
static double lcl_IterateInverse (const ScDistFunc &rFunction, double fAx, double fBx, bool &rConvError)
 
static double lcl_getLanczosSum (double fZ)
 you must ensure fZ>0 Uses a variant of the Lanczos sum with a rational function. More...
 
static double lcl_GetGammaHelper (double fZ)
 You must ensure fZ>0; fZ>171.624376956302 will overflow. More...
 
static double lcl_GetLogGammaHelper (double fZ)
 You must ensure fZ>0. More...
 
static double lcl_GetBetaHelperContFrac (double fX, double fA, double fB)
 
static double lcl_GetBinomDistRange (double n, double xs, double xe, double fFactor, double p, double q)
 
static void lcl_PutFactorialElements (::std::vector< double > &cn, double fLower, double fUpper, double fBase)
 Local function used in the calculation of the hypergeometric distribution. More...
 
static void lcl_QuickSort (tools::Long nLo, tools::Long nHi, vector< double > &rSortArray, vector< tools::Long > *pIndexOrder)
 
static void lcl_roundUpNearestPow2 (SCSIZE &nNum, SCSIZE &nNumBits)
 
static SCSIZE lcl_bitReverse (SCSIZE nIn, SCSIZE nBound)
 
static void lcl_normalize (std::vector< double > &rCmplxArray, bool bScaleOnlyReal)
 
static void lcl_convertToPolar (std::vector< double > &rCmplxArray, double fMinMag)
 

Variables

const double fMachEps = ::std::numeric_limits<double>::epsilon()
 

Typedef Documentation

using ScMatrixGenerator = ScMatrixRef(SCSIZE, SCSIZE, std::vector<double>&)

Definition at line 5421 of file interpr3.cxx.

Function Documentation

static SCSIZE lcl_bitReverse ( SCSIZE  nIn,
SCSIZE  nBound 
)
static

Definition at line 4820 of file interpr3.cxx.

static void lcl_convertToPolar ( std::vector< double > &  rCmplxArray,
double  fMinMag 
)
static

Definition at line 5112 of file interpr3.cxx.

static double lcl_GetBetaHelperContFrac ( double  fX,
double  fA,
double  fB 
)
static

Definition at line 934 of file interpr3.cxx.

References fMachEps.

Referenced by ScInterpreter::GetBetaDist().

static double lcl_GetBinomDistRange ( double  n,
double  xs,
double  xe,
double  fFactor,
double  p,
double  q 
)
static

Definition at line 1257 of file interpr3.cxx.

References i.

Referenced by ScInterpreter::ScB(), and ScInterpreter::ScBinomDist().

static double lcl_GetGammaHelper ( double  fZ)
static

You must ensure fZ>0; fZ>171.624376956302 will overflow.

Definition at line 556 of file interpr3.cxx.

References lcl_getLanczosSum().

Referenced by ScInterpreter::GetGamma(), and ScInterpreter::GetLogGamma().

static double lcl_getLanczosSum ( double  fZ)
static

you must ensure fZ>0 Uses a variant of the Lanczos sum with a rational function.

Definition at line 488 of file interpr3.cxx.

Referenced by ScInterpreter::GetBeta(), ScInterpreter::GetLogBeta(), lcl_GetGammaHelper(), and lcl_GetLogGammaHelper().

static double lcl_GetLogGammaHelper ( double  fZ)
static

You must ensure fZ>0.

Definition at line 574 of file interpr3.cxx.

References lcl_getLanczosSum(), and log.

Referenced by ScInterpreter::GetGamma(), and ScInterpreter::GetLogGamma().

static bool lcl_HasChangeOfSign ( double  u,
double  w 
)
static

u*w<0.0 fails for values near zero

Definition at line 72 of file interpr3.cxx.

Referenced by lcl_IterateInverse().

static double lcl_IterateInverse ( const ScDistFunc &  rFunction,
double  fAx,
double  fBx,
bool &  rConvError 
)
static
static void lcl_normalize ( std::vector< double > &  rCmplxArray,
bool  bScaleOnlyReal 
)
static

Definition at line 5095 of file interpr3.cxx.

static void lcl_PutFactorialElements ( ::std::vector< double > &  cn,
double  fLower,
double  fUpper,
double  fBase 
)
static

Local function used in the calculation of the hypergeometric distribution.

Definition at line 1836 of file interpr3.cxx.

References i.

Referenced by ScInterpreter::GetHypGeomDist().

static void lcl_QuickSort ( tools::Long  nLo,
tools::Long  nHi,
vector< double > &  rSortArray,
vector< tools::Long > *  pIndexOrder 
)
static

Definition at line 4141 of file interpr3.cxx.

References swap().

Referenced by ScInterpreter::QuickSort().

static void lcl_roundUpNearestPow2 ( SCSIZE nNum,
SCSIZE nNumBits 
)
static

Definition at line 4799 of file interpr3.cxx.

static size_t MAX_COUNT_DOUBLE_FOR_SORT ( const ScSheetLimits rSheetLimits)
static

Two columns of data should be sortable with GetSortArray() and QuickSort()

Definition at line 46 of file interpr3.cxx.

References ScSheetLimits::GetMaxRowCount().

Referenced by ScInterpreter::GetSortArray().

Variable Documentation

const double fMachEps = ::std::numeric_limits<double>::epsilon()

Definition at line 52 of file interpr3.cxx.

Referenced by lcl_GetBetaHelperContFrac(), and ScInterpreter::ScBinomDist().