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::IterateResult Sum (bool bTextAsZero, bool bIgnoreErrorValues) const
 
ScMatrix::IterateResult SumSquare (bool bTextAsZero, bool bIgnoreErrorValues) const
 
ScMatrix::IterateResult 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 >
std::vector< ScMatrix::IterateResultApplyCollectOperation (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 231 of file scmatrix.cxx.

Constructor & Destructor Documentation

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

Definition at line 380 of file scmatrix.cxx.

References GetElementCount(), and nElementsMax.

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

Definition at line 386 of file scmatrix.cxx.

References GetElementCount(), and nElementsMax.

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

Definition at line 392 of file scmatrix.cxx.

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

ScMatrixImpl::~ScMatrixImpl ( )

Definition at line 398 of file scmatrix.cxx.

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

Member Function Documentation

double ScMatrixImpl::And ( ) const

Definition at line 1093 of file scmatrix.cxx.

References maMat.

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

Definition at line 2454 of file scmatrix.cxx.

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

Definition at line 2447 of file scmatrix.cxx.

References maMat.

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

Definition at line 2649 of file scmatrix.cxx.

References SAL_WARN_IF.

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

void ScMatrixImpl::Clear ( )

Definition at line 404 of file scmatrix.cxx.

References maMat, and maMatFlag.

Referenced by ~ScMatrixImpl().

void ScMatrixImpl::CompareEqual ( )

Definition at line 989 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareGreater ( )

Definition at line 1013 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareGreaterEqual ( )

Definition at line 1029 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareLess ( )

Definition at line 1005 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::CompareLessEqual ( )

Definition at line 1021 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 997 of file scmatrix.cxx.

References maMat.

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

Definition at line 2136 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 2600 of file scmatrix.cxx.

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

Definition at line 904 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 449 of file scmatrix.cxx.

References maMat.

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

Definition at line 632 of file scmatrix.cxx.

References CalcPosition(), and GetDouble().

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

Definition at line 2222 of file scmatrix.cxx.

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

Definition at line 456 of file scmatrix.cxx.

References maMat.

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

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

Definition at line 598 of file scmatrix.cxx.

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

ScInterpreter* ScMatrixImpl::GetErrorInterpreter ( ) const
inline

Definition at line 252 of file scmatrix.cxx.

References pErrorInterpreter.

double ScMatrixImpl::GetGcd ( ) const

Definition at line 2171 of file scmatrix.cxx.

double ScMatrixImpl::GetLcm ( ) const

Definition at line 2178 of file scmatrix.cxx.

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

Definition at line 2157 of file scmatrix.cxx.

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

Definition at line 2164 of file scmatrix.cxx.

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

Definition at line 675 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 875 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

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

Definition at line 802 of file scmatrix.cxx.

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

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

Definition at line 811 of file scmatrix.cxx.

References maMat, maMatFlag, and ValidColRowReplicated().

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

Definition at line 829 of file scmatrix.cxx.

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

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

Definition at line 820 of file scmatrix.cxx.

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

bool ScMatrixImpl::IsNumeric ( ) const

Definition at line 881 of file scmatrix.cxx.

References maMat.

bool ScMatrixImpl::IsStringOrEmpty ( SCSIZE  nIndex) const

Definition at line 781 of file scmatrix.cxx.

References CalcPosition().

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

Definition at line 788 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

bool ScMatrixImpl::IsValue ( SCSIZE  nIndex) const

Definition at line 839 of file scmatrix.cxx.

References CalcPosition().

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

Definition at line 846 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

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

Definition at line 860 of file scmatrix.cxx.

References maMat, and ValidColRowReplicated().

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

Definition at line 2143 of file scmatrix.cxx.

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

Definition at line 2150 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 886 of file scmatrix.cxx.

References maMat.

void ScMatrixImpl::MatTrans ( ScMatrixImpl mRes) const

Definition at line 898 of file scmatrix.cxx.

References maMat.

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

Definition at line 2230 of file scmatrix.cxx.

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

Definition at line 1100 of file scmatrix.cxx.

References maMat.

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

Definition at line 2131 of file scmatrix.cxx.

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

Definition at line 588 of file scmatrix.cxx.

References maMat, and ValidColRow().

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

Definition at line 503 of file scmatrix.cxx.

References maMat, and ValidColRow().

Referenced by PutDouble().

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

Definition at line 523 of file scmatrix.cxx.

References CalcPosition(), and PutDouble().

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

Definition at line 513 of file scmatrix.cxx.

References maMat, and ValidColRow().

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

Definition at line 921 of file scmatrix.cxx.

References maMat, and ValidColRow().

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

Definition at line 557 of file scmatrix.cxx.

References maMat, maMatFlag, and ValidColRow().

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

Definition at line 570 of file scmatrix.cxx.

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

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

Definition at line 974 of file scmatrix.cxx.

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

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

Definition at line 959 of file scmatrix.cxx.

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

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

Definition at line 945 of file scmatrix.cxx.

References maMat, maMatFlag, and ValidColRow().

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

Definition at line 583 of file scmatrix.cxx.

References CreateDoubleError(), and maMat.

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

Definition at line 530 of file scmatrix.cxx.

References maMat, and ValidColRow().

Referenced by PutString().

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

Definition at line 550 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 540 of file scmatrix.cxx.

References maMat, and ValidColRow().

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

Definition at line 933 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 497 of file scmatrix.cxx.

References pErrorInterpreter, and ScInterpreter::SetError().

Referenced by GetDouble(), and GetString().

void ScMatrixImpl::SetErrorInterpreter ( ScInterpreter p)

Definition at line 444 of file scmatrix.cxx.

References pErrorInterpreter.

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

Definition at line 2121 of file scmatrix.cxx.

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

Definition at line 2126 of file scmatrix.cxx.

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

Definition at line 492 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 1107 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: