LibreOffice Module sc (master)
1
|
Public Member Functions | |
ScMatrixImpl (const ScMatrixImpl &)=delete | |
const ScMatrixImpl & | operator= (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) |
ScInterpreter * | GetErrorInterpreter () 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 |
ScInterpreter * | pErrorInterpreter |
Definition at line 226 of file scmatrix.cxx.
|
delete |
Definition at line 375 of file scmatrix.cxx.
References GetElementCount(), and nElementsMax.
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.
double ScMatrixImpl::And | ( | ) | const |
Definition at line 1088 of file scmatrix.cxx.
References maMat.
ScMatrix::IterateResultMultiple< tRes > ScMatrixImpl::ApplyCollectOperation | ( | const std::vector< T > & | aOp | ) |
Definition at line 2400 of file scmatrix.cxx.
void ScMatrixImpl::ApplyOperation | ( | T | aOp, |
ScMatrixImpl & | rMat | ||
) |
Definition at line 2393 of file scmatrix.cxx.
References maMat.
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 |
Definition at line 2131 of file scmatrix.cxx.
References sc::Compare::maCells, sc::Compare::Cell::mbEmpty, sc::Compare::Cell::mbValue, and sc::Compare::Cell::mfValue.
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.
Definition at line 899 of file scmatrix.cxx.
References maMat, and ValidColRow().
ScMatrixValue ScMatrixImpl::Get | ( | SCSIZE | nC, |
SCSIZE | nR | ||
) | const |
Definition at line 727 of file scmatrix.cxx.
References ScMatrixValue::aStr, Boolean, Empty, EmptyPath, eType, ScMatrixValue::fVal, maMat, maMatFlag, ScMatrixValue::nType, SC_MATFLAG_EMPTYPATH, String, ValidColRowOrReplicated(), and Value.
Referenced by GetDoubleWithStringConversion().
Definition at line 444 of file scmatrix.cxx.
References maMat.
Definition at line 607 of file scmatrix.cxx.
References CreateDoubleError(), GetDoubleErrorValue(), maMat, pErrorInterpreter, SetErrorAtInterpreter(), and ValidColRowOrReplicated().
Referenced by GetDouble().
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.
Definition at line 634 of file scmatrix.cxx.
References ScMatrixValue::aStr, ScMatrixValue::fVal, Get(), svl::SharedString::getString(), ScMatrixValue::nType, pErrorInterpreter, and String.
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().
|
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 |
Definition at line 642 of file scmatrix.cxx.
References GetDoubleErrorValue(), svl::SharedString::getEmptyString(), maMat, SetErrorAtInterpreter(), and ValidColRowOrReplicated().
Referenced by GetString().
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 |
Definition at line 677 of file scmatrix.cxx.
References aStr, ScGlobal::eLnge, GetDoubleErrorValue(), svl::SharedString::getEmptyString(), ScGlobal::GetErrorString(), SvNumberFormatter::GetInputLineString(), SvNumberFormatter::GetOutputString(), SvNumberFormatter::GetStandardFormat(), maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, SetErrorAtInterpreter(), and ValidColRowOrReplicated().
Definition at line 870 of file scmatrix.cxx.
References maMat, and ValidColRowReplicated().
Definition at line 797 of file scmatrix.cxx.
References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRowReplicated().
Definition at line 806 of file scmatrix.cxx.
References maMat, maMatFlag, and ValidColRowReplicated().
Definition at line 824 of file scmatrix.cxx.
References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRowOrReplicated().
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().
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().
Definition at line 841 of file scmatrix.cxx.
References maMat, and ValidColRowReplicated().
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 | ||
) |
Definition at line 2612 of file scmatrix.cxx.
References aStr, CreateDoubleError(), ScGlobal::eLnge, GetDoubleErrorValue(), SvNumberFormatter::GetInputLineString(), SvNumberFormatter::GetStandardFormat(), i, and svl::SharedStringPool::intern().
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.
|
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.
Definition at line 583 of file scmatrix.cxx.
References maMat, and ValidColRow().
Definition at line 498 of file scmatrix.cxx.
References maMat, and ValidColRow().
Referenced by PutDouble().
Definition at line 518 of file scmatrix.cxx.
References CalcPosition(), and PutDouble().
Definition at line 508 of file scmatrix.cxx.
References maMat, and ValidColRow().
Definition at line 916 of file scmatrix.cxx.
References maMat, and ValidColRow().
Definition at line 552 of file scmatrix.cxx.
References maMat, maMatFlag, and ValidColRow().
Definition at line 565 of file scmatrix.cxx.
References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRow().
Definition at line 969 of file scmatrix.cxx.
References maMat, maMatFlag, SC_MATFLAG_EMPTYPATH, and ValidColRow().
Definition at line 954 of file scmatrix.cxx.
References maMat, maMatFlag, SC_MATFLAG_EMPTYRESULT, and ValidColRow().
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().
Definition at line 405 of file scmatrix.cxx.
References CreateDoubleError(), GetElementCount(), ScMatrix::IsSizeAllocatable(), maMat, maMatFlag, and nElementsMax.
Definition at line 422 of file scmatrix.cxx.
References CreateDoubleError(), GetElementCount(), ScMatrix::IsSizeAllocatable(), maMat, maMatFlag, and nElementsMax.
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.
Definition at line 457 of file scmatrix.cxx.
References maMat.
Referenced by FillDouble(), PutBoolean(), PutDouble(), PutDoubleVector(), PutEmpty(), PutEmptyPath(), PutEmptyPathVector(), PutEmptyResultVector(), PutEmptyVector(), PutString(), PutStringVector(), and ValidColRowOrReplicated().
Definition at line 487 of file scmatrix.cxx.
References ValidColRow(), and ValidColRowReplicated().
Referenced by Get(), GetDouble(), GetError(), GetString(), and IsEmptyPath().
Definition at line 463 of file scmatrix.cxx.
References maMat.
Referenced by IsBoolean(), IsEmpty(), IsEmptyCell(), IsEmptyResult(), IsStringOrEmpty(), IsValue(), IsValueOrEmpty(), and ValidColRowOrReplicated().
double ScMatrixImpl::Xor | ( | ) | const |
Definition at line 1102 of file scmatrix.cxx.
References maMat.
|
private |
Definition at line 228 of file scmatrix.cxx.
Referenced by And(), ApplyOperation(), Clear(), CompareEqual(), CompareGreater(), CompareGreaterEqual(), CompareLess(), CompareLessEqual(), CompareNotEqual(), FillDouble(), Get(), GetDimensions(), GetDouble(), GetElementCount(), GetError(), GetString(), IsBoolean(), IsEmpty(), IsEmptyCell(), IsEmptyPath(), IsEmptyResult(), IsNumeric(), IsStringOrEmpty(), IsValue(), IsValueOrEmpty(), MatCopy(), MatTrans(), Or(), PutBoolean(), PutDouble(), PutDoubleVector(), PutEmpty(), PutEmptyPath(), PutEmptyPathVector(), PutEmptyResultVector(), PutEmptyVector(), PutError(), PutString(), PutStringVector(), Resize(), ValidColRow(), ValidColRowReplicated(), and Xor().
|
private |
Definition at line 229 of file scmatrix.cxx.
Referenced by Clear(), Get(), GetString(), IsEmpty(), IsEmptyCell(), IsEmptyPath(), IsEmptyResult(), PutEmpty(), PutEmptyPath(), PutEmptyPathVector(), PutEmptyResultVector(), PutEmptyVector(), and Resize().
|
private |
Definition at line 230 of file scmatrix.cxx.
Referenced by GetDouble(), GetDoubleWithStringConversion(), GetErrorInterpreter(), SetErrorAtInterpreter(), and SetErrorInterpreter().