LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScMatrixImpl Class Reference
Collaboration diagram for ScMatrixImpl:
[legend]

Public Member Functions

 ScMatrixImpl (const ScMatrixImpl &)=delete
 
const ScMatrixImploperator= (const ScMatrixImpl &)=delete
 
 ScMatrixImpl (SCSIZE nC, SCSIZE nR)
 
 ScMatrixImpl (SCSIZE nC, SCSIZE nR, double fInitVal)
 
 ScMatrixImpl (size_t nC, size_t nR, const std::vector< double > &rInitVals)
 
 ~ScMatrixImpl () COVERITY_NOEXCEPT_FALSE
 
void Clear ()
 
void Resize (SCSIZE nC, SCSIZE nR)
 
void Resize (SCSIZE nC, SCSIZE nR, double fVal)
 
void SetErrorInterpreter (ScInterpreter *p)
 
ScInterpreterGetErrorInterpreter () const
 
void GetDimensions (SCSIZE &rC, SCSIZE &rR) const
 
SCSIZE GetElementCount () const
 
bool ValidColRow (SCSIZE nC, SCSIZE nR) const
 
bool ValidColRowReplicated (SCSIZE &rC, SCSIZE &rR) const
 
bool ValidColRowOrReplicated (SCSIZE &rC, SCSIZE &rR) const
 
void SetErrorAtInterpreter (FormulaError nError) const
 
void PutDouble (double fVal, SCSIZE nC, SCSIZE nR)
 
void PutDouble (double fVal, SCSIZE nIndex)
 
void PutDouble (const double *pArray, size_t nLen, SCSIZE nC, SCSIZE nR)
 
void PutString (const svl::SharedString &rStr, SCSIZE nC, SCSIZE nR)
 
void PutString (const svl::SharedString &rStr, SCSIZE nIndex)
 
void PutString (const svl::SharedString *pArray, size_t nLen, SCSIZE nC, SCSIZE nR)
 
void PutEmpty (SCSIZE nC, SCSIZE nR)
 
void PutEmptyPath (SCSIZE nC, SCSIZE nR)
 
void PutError (FormulaError nErrorCode, SCSIZE nC, SCSIZE nR)
 
void PutBoolean (bool bVal, SCSIZE nC, SCSIZE nR)
 
FormulaError GetError (SCSIZE nC, SCSIZE nR) const
 
double GetDouble (SCSIZE nC, SCSIZE nR) const
 
double GetDouble (SCSIZE nIndex) const
 
double GetDoubleWithStringConversion (SCSIZE nC, SCSIZE nR) const
 
svl::SharedString GetString (SCSIZE nC, SCSIZE nR) const
 
svl::SharedString GetString (SCSIZE nIndex) const
 
svl::SharedString GetString (SvNumberFormatter &rFormatter, SCSIZE nC, SCSIZE nR) const
 
ScMatrixValue Get (SCSIZE nC, SCSIZE nR) const
 
bool IsStringOrEmpty (SCSIZE nIndex) const
 
bool IsStringOrEmpty (SCSIZE nC, SCSIZE nR) const
 
bool IsEmpty (SCSIZE nC, SCSIZE nR) const
 
bool IsEmptyCell (SCSIZE nC, SCSIZE nR) const
 
bool IsEmptyResult (SCSIZE nC, SCSIZE nR) const
 
bool IsEmptyPath (SCSIZE nC, SCSIZE nR) const
 
bool IsValue (SCSIZE nIndex) const
 
bool IsValue (SCSIZE nC, SCSIZE nR) const
 
bool IsValueOrEmpty (SCSIZE nC, SCSIZE nR) const
 
bool IsBoolean (SCSIZE nC, SCSIZE nR) const
 
bool IsNumeric () const
 
void MatCopy (ScMatrixImpl &mRes) const
 
void MatTrans (ScMatrixImpl &mRes) const
 
void FillDouble (double fVal, SCSIZE nC1, SCSIZE nR1, SCSIZE nC2, SCSIZE nR2)
 
void PutDoubleVector (const ::std::vector< double > &rVec, SCSIZE nC, SCSIZE nR)
 
void PutStringVector (const ::std::vector< svl::SharedString > &rVec, SCSIZE nC, SCSIZE nR)
 
void PutEmptyVector (SCSIZE nCount, SCSIZE nC, SCSIZE nR)
 
void PutEmptyResultVector (SCSIZE nCount, SCSIZE nC, SCSIZE nR)
 
void PutEmptyPathVector (SCSIZE nCount, SCSIZE nC, SCSIZE nR)
 
void CompareEqual ()
 
void CompareNotEqual ()
 
void CompareLess ()
 
void CompareGreater ()
 
void CompareLessEqual ()
 
void CompareGreaterEqual ()
 
double And () const
 
double Or () const
 
double Xor () const
 
ScMatrix::KahanIterateResult Sum (bool bTextAsZero, bool bIgnoreErrorValues) const
 
ScMatrix::KahanIterateResult SumSquare (bool bTextAsZero, bool bIgnoreErrorValues) const
 
ScMatrix::DoubleIterateResult Product (bool bTextAsZero, bool bIgnoreErrorValues) const
 
size_t Count (bool bCountStrings, bool bCountErrors, bool bIgnoreEmptyStrings) const
 
size_t MatchDoubleInColumns (double fValue, size_t nCol1, size_t nCol2) const
 
size_t MatchStringInColumns (const svl::SharedString &rStr, size_t nCol1, size_t nCol2) const
 
double GetMaxValue (bool bTextAsZero, bool bIgnoreErrorValues) const
 
double GetMinValue (bool bTextAsZero, bool bIgnoreErrorValues) const
 
double GetGcd () const
 
double GetLcm () const
 
ScMatrixRef CompareMatrix (sc::Compare &rComp, size_t nMatPos, sc::CompareOptions *pOptions) const
 
void GetDoubleArray (std::vector< double > &rArray, bool bEmptyAsZero) const
 
void MergeDoubleArrayMultiply (std::vector< double > &rArray) const
 
template<typename T >
void ApplyOperation (T aOp, ScMatrixImpl &rMat)
 
void ExecuteOperation (const std::pair< size_t, size_t > &rStartPos, const std::pair< size_t, size_t > &rEndPos, const ScMatrix::DoubleOpFunction &aDoubleFunc, const ScMatrix::BoolOpFunction &aBoolFunc, const ScMatrix::StringOpFunction &aStringFunc, const ScMatrix::EmptyOpFunction &aEmptyFunc) const
 
template<typename T , typename tRes >
ScMatrix::IterateResultMultiple< tRes > ApplyCollectOperation (const std::vector< T > &aOp)
 
void MatConcat (SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrixRef &xMat1, const ScMatrixRef &xMat2, SvNumberFormatter &rFormatter, svl::SharedStringPool &rPool)
 

Private Member Functions

void CalcPosition (SCSIZE nIndex, SCSIZE &rC, SCSIZE &rR) const
 

Private Attributes

MatrixImplType maMat
 
MatrixImplType maMatFlag
 
ScInterpreterpErrorInterpreter
 

Detailed Description

Definition at line 226 of file scmatrix.cxx.

Constructor & Destructor Documentation

ScMatrixImpl::ScMatrixImpl ( const ScMatrixImpl )
delete
ScMatrixImpl::ScMatrixImpl ( SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 375 of file scmatrix.cxx.

References GetElementCount(), and nElementsMax.

ScMatrixImpl::ScMatrixImpl ( SCSIZE  nC,
SCSIZE  nR,
double  fInitVal 
)

Definition at line 381 of file scmatrix.cxx.

References GetElementCount(), and nElementsMax.

ScMatrixImpl::ScMatrixImpl ( size_t  nC,
size_t  nR,
const std::vector< double > &  rInitVals 
)

Definition at line 387 of file scmatrix.cxx.

References begin, end, GetElementCount(), and nElementsMax.

ScMatrixImpl::~ScMatrixImpl ( )

Definition at line 393 of file scmatrix.cxx.

References Clear(), GetElementCount(), and nElementsMax.

Member Function Documentation

double ScMatrixImpl::And ( ) const

Definition at line 1088 of file scmatrix.cxx.

References maMat.

template<typename T , typename tRes >
ScMatrix::IterateResultMultiple< tRes > ScMatrixImpl::ApplyCollectOperation ( const std::vector< T > &  aOp)

Definition at line 2400 of file scmatrix.cxx.

template<typename T >
void ScMatrixImpl::ApplyOperation ( aOp,
ScMatrixImpl rMat 
)

Definition at line 2393 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CalcPosition ( SCSIZE  nIndex,
SCSIZE rC,
SCSIZE rR 
) const
private

Definition at line 2595 of file scmatrix.cxx.

References SAL_WARN_IF.

Referenced by GetDouble(), GetString(), IsStringOrEmpty(), IsValue(), PutDouble(), and PutString().

void ScMatrixImpl::Clear ( )

Definition at line 399 of file scmatrix.cxx.

References maMat, and maMatFlag.

Referenced by ~ScMatrixImpl().

void ScMatrixImpl::CompareEqual ( )

Definition at line 984 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareGreater ( )

Definition at line 1008 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareGreaterEqual ( )

Definition at line 1024 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareLess ( )

Definition at line 1000 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareLessEqual ( )

Definition at line 1016 of file scmatrix.cxx.

References maMat.

ScMatrixRef ScMatrixImpl::CompareMatrix ( sc::Compare rComp,
size_t  nMatPos,
sc::CompareOptions pOptions 
) const
void ScMatrixImpl::CompareNotEqual ( )

Definition at line 992 of file scmatrix.cxx.

References maMat.

size_t ScMatrixImpl::Count ( bool  bCountStrings,
bool  bCountErrors,
bool  bIgnoreEmptyStrings 
) const

Definition at line 2082 of file scmatrix.cxx.

void ScMatrixImpl::ExecuteOperation ( const std::pair< size_t, size_t > &  rStartPos,
const std::pair< size_t, size_t > &  rEndPos,
const ScMatrix::DoubleOpFunction aDoubleFunc,
const ScMatrix::BoolOpFunction aBoolFunc,
const ScMatrix::StringOpFunction aStringFunc,
const ScMatrix::EmptyOpFunction aEmptyFunc 
) const

Definition at line 2546 of file scmatrix.cxx.

void ScMatrixImpl::FillDouble ( double  fVal,
SCSIZE  nC1,
SCSIZE  nR1,
SCSIZE  nC2,
SCSIZE  nR2 
)

Definition at line 899 of file scmatrix.cxx.

References maMat, and ValidColRow().

ScMatrixValue ScMatrixImpl::Get ( SCSIZE  nC,
SCSIZE  nR 
) const
void ScMatrixImpl::GetDimensions ( SCSIZE rC,
SCSIZE rR 
) const

Definition at line 444 of file scmatrix.cxx.

References maMat.

double ScMatrixImpl::GetDouble ( SCSIZE  nC,
SCSIZE  nR 
) const
double ScMatrixImpl::GetDouble ( SCSIZE  nIndex) const

Definition at line 627 of file scmatrix.cxx.

References CalcPosition(), and GetDouble().

void ScMatrixImpl::GetDoubleArray ( std::vector< double > &  rArray,
bool  bEmptyAsZero 
) const

Definition at line 2168 of file scmatrix.cxx.

double ScMatrixImpl::GetDoubleWithStringConversion ( SCSIZE  nC,
SCSIZE  nR 
) const
SCSIZE ScMatrixImpl::GetElementCount ( ) const

Definition at line 451 of file scmatrix.cxx.

References maMat.

Referenced by Resize(), ScMatrixImpl(), and ~ScMatrixImpl().

FormulaError ScMatrixImpl::GetError ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 593 of file scmatrix.cxx.

References GetDoubleErrorValue(), maMat, and ValidColRowOrReplicated().

ScInterpreter* ScMatrixImpl::GetErrorInterpreter ( ) const
inline

Definition at line 247 of file scmatrix.cxx.

References pErrorInterpreter.

double ScMatrixImpl::GetGcd ( ) const

Definition at line 2117 of file scmatrix.cxx.

double ScMatrixImpl::GetLcm ( ) const

Definition at line 2124 of file scmatrix.cxx.

double ScMatrixImpl::GetMaxValue ( bool  bTextAsZero,
bool  bIgnoreErrorValues 
) const

Definition at line 2103 of file scmatrix.cxx.

double ScMatrixImpl::GetMinValue ( bool  bTextAsZero,
bool  bIgnoreErrorValues 
) const

Definition at line 2110 of file scmatrix.cxx.

svl::SharedString ScMatrixImpl::GetString ( SCSIZE  nC,
SCSIZE  nR 
) const
svl::SharedString ScMatrixImpl::GetString ( SCSIZE  nIndex) const

Definition at line 670 of file scmatrix.cxx.

References CalcPosition(), and GetString().

svl::SharedString ScMatrixImpl::GetString ( SvNumberFormatter rFormatter,
SCSIZE  nC,
SCSIZE  nR 
) const
bool ScMatrixImpl::IsBoolean ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 870 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

bool ScMatrixImpl::IsEmpty ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 797 of file scmatrix.cxx.

References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRowReplicated().

bool ScMatrixImpl::IsEmptyCell ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 806 of file scmatrix.cxx.

References maMat, maMatFlag, and ValidColRowReplicated().

bool ScMatrixImpl::IsEmptyPath ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 824 of file scmatrix.cxx.

References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRowOrReplicated().

bool ScMatrixImpl::IsEmptyResult ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 815 of file scmatrix.cxx.

References maMat, maMatFlag, SC_MATFLAG_EMPTYRESULT, and ValidColRowReplicated().

bool ScMatrixImpl::IsNumeric ( ) const

Definition at line 876 of file scmatrix.cxx.

References maMat.

bool ScMatrixImpl::IsStringOrEmpty ( SCSIZE  nIndex) const

Definition at line 776 of file scmatrix.cxx.

References CalcPosition().

bool ScMatrixImpl::IsStringOrEmpty ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 783 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

bool ScMatrixImpl::IsValue ( SCSIZE  nIndex) const

Definition at line 834 of file scmatrix.cxx.

References CalcPosition().

bool ScMatrixImpl::IsValue ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 841 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

bool ScMatrixImpl::IsValueOrEmpty ( SCSIZE  nC,
SCSIZE  nR 
) const

Definition at line 855 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

size_t ScMatrixImpl::MatchDoubleInColumns ( double  fValue,
size_t  nCol1,
size_t  nCol2 
) const

Definition at line 2089 of file scmatrix.cxx.

size_t ScMatrixImpl::MatchStringInColumns ( const svl::SharedString rStr,
size_t  nCol1,
size_t  nCol2 
) const

Definition at line 2096 of file scmatrix.cxx.

void ScMatrixImpl::MatConcat ( SCSIZE  nMaxCol,
SCSIZE  nMaxRow,
const ScMatrixRef xMat1,
const ScMatrixRef xMat2,
SvNumberFormatter rFormatter,
svl::SharedStringPool rPool 
)
void ScMatrixImpl::MatCopy ( ScMatrixImpl mRes) const

Definition at line 881 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::MatTrans ( ScMatrixImpl mRes) const

Definition at line 893 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::MergeDoubleArrayMultiply ( std::vector< double > &  rArray) const

Definition at line 2176 of file scmatrix.cxx.

const ScMatrixImpl& ScMatrixImpl::operator= ( const ScMatrixImpl )
delete
double ScMatrixImpl::Or ( ) const

Definition at line 1095 of file scmatrix.cxx.

References maMat.

ScMatrix::DoubleIterateResult ScMatrixImpl::Product ( bool  bTextAsZero,
bool  bIgnoreErrorValues 
) const

Definition at line 2077 of file scmatrix.cxx.

void ScMatrixImpl::PutBoolean ( bool  bVal,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 583 of file scmatrix.cxx.

References maMat, and ValidColRow().

void ScMatrixImpl::PutDouble ( double  fVal,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 498 of file scmatrix.cxx.

References maMat, and ValidColRow().

Referenced by PutDouble().

void ScMatrixImpl::PutDouble ( double  fVal,
SCSIZE  nIndex 
)

Definition at line 518 of file scmatrix.cxx.

References CalcPosition(), and PutDouble().

void ScMatrixImpl::PutDouble ( const double *  pArray,
size_t  nLen,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 508 of file scmatrix.cxx.

References maMat, and ValidColRow().

void ScMatrixImpl::PutDoubleVector ( const ::std::vector< double > &  rVec,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 916 of file scmatrix.cxx.

References maMat, and ValidColRow().

void ScMatrixImpl::PutEmpty ( SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 552 of file scmatrix.cxx.

References maMat, maMatFlag, and ValidColRow().

void ScMatrixImpl::PutEmptyPath ( SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 565 of file scmatrix.cxx.

References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRow().

void ScMatrixImpl::PutEmptyPathVector ( SCSIZE  nCount,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 969 of file scmatrix.cxx.

References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRow().

void ScMatrixImpl::PutEmptyResultVector ( SCSIZE  nCount,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 954 of file scmatrix.cxx.

References maMat, maMatFlag, SC_MATFLAG_EMPTYRESULT, and ValidColRow().

void ScMatrixImpl::PutEmptyVector ( SCSIZE  nCount,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 940 of file scmatrix.cxx.

References maMat, maMatFlag, and ValidColRow().

void ScMatrixImpl::PutError ( FormulaError  nErrorCode,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 578 of file scmatrix.cxx.

References CreateDoubleError(), and maMat.

void ScMatrixImpl::PutString ( const svl::SharedString rStr,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 525 of file scmatrix.cxx.

References maMat, and ValidColRow().

Referenced by PutString().

void ScMatrixImpl::PutString ( const svl::SharedString rStr,
SCSIZE  nIndex 
)

Definition at line 545 of file scmatrix.cxx.

References CalcPosition(), and PutString().

void ScMatrixImpl::PutString ( const svl::SharedString pArray,
size_t  nLen,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 535 of file scmatrix.cxx.

References maMat, and ValidColRow().

void ScMatrixImpl::PutStringVector ( const ::std::vector< svl::SharedString > &  rVec,
SCSIZE  nC,
SCSIZE  nR 
)

Definition at line 928 of file scmatrix.cxx.

References maMat, and ValidColRow().

void ScMatrixImpl::Resize ( SCSIZE  nC,
SCSIZE  nR 
)
void ScMatrixImpl::Resize ( SCSIZE  nC,
SCSIZE  nR,
double  fVal 
)
void ScMatrixImpl::SetErrorAtInterpreter ( FormulaError  nError) const

Definition at line 492 of file scmatrix.cxx.

References pErrorInterpreter, and ScInterpreter::SetError().

Referenced by GetDouble(), and GetString().

void ScMatrixImpl::SetErrorInterpreter ( ScInterpreter p)

Definition at line 439 of file scmatrix.cxx.

References pErrorInterpreter.

ScMatrix::KahanIterateResult ScMatrixImpl::Sum ( bool  bTextAsZero,
bool  bIgnoreErrorValues 
) const

Definition at line 2067 of file scmatrix.cxx.

ScMatrix::KahanIterateResult ScMatrixImpl::SumSquare ( bool  bTextAsZero,
bool  bIgnoreErrorValues 
) const

Definition at line 2072 of file scmatrix.cxx.

bool ScMatrixImpl::ValidColRow ( SCSIZE  nC,
SCSIZE  nR 
) const
bool ScMatrixImpl::ValidColRowOrReplicated ( SCSIZE rC,
SCSIZE rR 
) const

Definition at line 487 of file scmatrix.cxx.

References ValidColRow(), and ValidColRowReplicated().

Referenced by Get(), GetDouble(), GetError(), GetString(), and IsEmptyPath().

bool ScMatrixImpl::ValidColRowReplicated ( SCSIZE rC,
SCSIZE rR 
) const
double ScMatrixImpl::Xor ( ) const

Definition at line 1102 of file scmatrix.cxx.

References maMat.

Member Data Documentation

MatrixImplType ScMatrixImpl::maMat
private
MatrixImplType ScMatrixImpl::maMatFlag
private
ScInterpreter* ScMatrixImpl::pErrorInterpreter
private

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