LibreOffice Module sc (master) 1
|
Matrix data type that can store values of mixed types. More...
#include <scmatrix.hxx>
Classes | |
struct | IterateResult |
Iterator for executing one operation with the matrix data. More... | |
struct | IterateResultMultiple |
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... | |
Public Types | |
typedef std::function< void(size_t, size_t, double)> | DoubleOpFunction |
typedef std::function< void(size_t, size_t, bool)> | BoolOpFunction |
typedef std::function< void(size_t, size_t, svl::SharedString)> | StringOpFunction |
typedef std::function< void(size_t, size_t)> | EmptyOpFunction |
typedef std::function< double(double, double)> | CalculateOpFunction |
typedef IterateResultMultiple< KahanSum > | KahanIterateResultMultiple |
typedef IterateResultMultiple< double > | DoubleIterateResultMultiple |
typedef IterateResult< KahanSum > | KahanIterateResult |
typedef IterateResult< double > | DoubleIterateResult |
Public Member Functions | |
ScMatrix (SCSIZE nC, SCSIZE nR) | |
ScMatrix (SCSIZE nC, SCSIZE nR, double fInitVal) | |
ScMatrix (size_t nC, size_t nR, const std::vector< double > &rInitVals) | |
~ScMatrix () | |
ScMatrix * | Clone () const |
Clone the matrix. More... | |
ScMatrix * | CloneIfConst () |
Clone the matrix if mbCloneIfConst (immutable) is set, otherwise return this matrix, to be assigned to a ScMatrixRef. More... | |
void | SetMutable () |
Set the matrix to mutable for CloneIfConst(), only the interpreter should do this and know the consequences. More... | |
void | SetImmutable () const |
Set the matrix to immutable for CloneIfConst(), only the interpreter should do this and know the consequences. More... | |
void | Resize (SCSIZE nC, SCSIZE nR) |
Resize the matrix to specified new dimension. More... | |
void | Resize (SCSIZE nC, SCSIZE nR, double fVal) |
ScMatrix * | CloneAndExtend (SCSIZE nNewCols, SCSIZE nNewRows) const |
Clone the matrix and extend it to the new size. More... | |
void | IncRef () const |
void | DecRef () const |
void | SetErrorInterpreter (ScInterpreter *p) |
void | GetDimensions (SCSIZE &rC, SCSIZE &rR) const |
SCSIZE | GetElementCount () const |
bool | ValidColRow (SCSIZE nC, SCSIZE nR) const |
bool | ValidColRowReplicated (SCSIZE &rC, SCSIZE &rR) const |
For a row vector or column vector, if the position does not point into the vector but is a valid column or row offset it is adapted such that it points to an element to be replicated, same column row 0 for a row vector, same row column 0 for a column vector. More... | |
bool | ValidColRowOrReplicated (SCSIZE &rC, SCSIZE &rR) const |
Checks if the matrix position is within the matrix. More... | |
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) |
Jump sal_False without path. More... | |
void | PutError (FormulaError nErrorCode, SCSIZE nC, SCSIZE nR) |
void | PutBoolean (bool bVal, SCSIZE nC, SCSIZE nR) |
void | FillDouble (double fVal, SCSIZE nC1, SCSIZE nR1, SCSIZE nC2, SCSIZE nR2) |
void | PutDoubleVector (const ::std::vector< double > &rVec, SCSIZE nC, SCSIZE nR) |
Put a column vector of doubles, starting at row nR, must fit into dimensions. More... | |
void | PutStringVector (const ::std::vector< svl::SharedString > &rVec, SCSIZE nC, SCSIZE nR) |
Put a column vector of strings, starting at row nR, must fit into dimensions. More... | |
void | PutEmptyVector (SCSIZE nCount, SCSIZE nC, SCSIZE nR) |
Put a column vector of empties, starting at row nR, must fit into dimensions. More... | |
void | PutEmptyResultVector (SCSIZE nCount, SCSIZE nC, SCSIZE nR) |
Put a column vector of empty results, starting at row nR, must fit into dimensions. More... | |
void | PutEmptyPathVector (SCSIZE nCount, SCSIZE nC, SCSIZE nR) |
Put a column vector of empty paths, starting at row nR, must fit into dimensions. More... | |
FormulaError | GetError (SCSIZE nC, SCSIZE nR) const |
May be used before obtaining the double value of an element to avoid passing its NAN around. More... | |
FormulaError | GetErrorIfNotString (SCSIZE nC, SCSIZE nR) const |
Use in ScInterpreter to obtain the error code, if any. More... | |
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 |
@ATTENTION: If bString the ScMatrixValue->pS may still be NULL to indicate an empty string! More... | |
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 | MatTrans (const ScMatrix &mRes) const |
void | MatCopy (const ScMatrix &mRes) const |
void | CompareEqual () |
void | CompareNotEqual () |
void | CompareLess () |
void | CompareGreater () |
void | CompareLessEqual () |
void | CompareGreaterEqual () |
double | And () const |
double | Or () const |
double | Xor () const |
KahanIterateResult | Sum (bool bTextAsZero, bool bIgnoreErrorValues=false) const |
KahanIterateResult | SumSquare (bool bTextAsZero, bool bIgnoreErrorValues=false) const |
DoubleIterateResult | Product (bool bTextAsZero, bool bIgnoreErrorValues=false) const |
size_t | Count (bool bCountStrings, bool bCountErrors, bool bIgnoreEmptyStrings=false) 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=false) const |
double | GetMinValue (bool bTextAsZero, bool bIgnoreErrorValues=false) 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=true) const |
Convert the content of matrix into a linear array of numeric values. More... | |
void | MergeDoubleArrayMultiply (std::vector< double > &rArray) const |
void | NotOp (const ScMatrix &rMat) |
void | NegOp (const ScMatrix &rMat) |
void | AddOp (double fVal, const ScMatrix &rMat) |
void | SubOp (bool bFlag, double fVal, const ScMatrix &rMat) |
void | MulOp (double fVal, const ScMatrix &rMat) |
void | DivOp (bool bFlag, double fVal, const ScMatrix &rMat) |
void | PowOp (bool bFlag, double fVal, const ScMatrix &rMat) |
KahanIterateResultMultiple | CollectKahan (const std::vector< sc::op::kOp > &aOp) |
void | ExecuteOperation (const std::pair< size_t, size_t > &rStartPos, const std::pair< size_t, size_t > &rEndPos, DoubleOpFunction aDoubleFunc, BoolOpFunction aBoolFunc, StringOpFunction aStringFunc, EmptyOpFunction aEmptyFunc) const |
void | MatConcat (SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrixRef &xMat1, const ScMatrixRef &xMat2, SvNumberFormatter &rFormatter, svl::SharedStringPool &rPool) |
void | ExecuteBinaryOp (SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrix &rInputMat1, const ScMatrix &rInputMat2, ScInterpreter *pInterpreter, CalculateOpFunction op) |
Apply binary operation to values from two input matrices, storing result into this matrix. More... | |
Static Public Member Functions | |
static bool | IsSizeAllocatable (SCSIZE nC, SCSIZE nR) |
Checks nC or nR for zero and uses GetElementsMax() whether a matrix of the size of nC*nR could be allocated. More... | |
static bool | IsValueType (ScMatValType nType) |
Value or boolean. More... | |
static bool | IsBooleanType (ScMatValType nType) |
Boolean. More... | |
static bool | IsNonValueType (ScMatValType nType) |
String, empty or empty path, but not value nor boolean. More... | |
static bool | IsRealStringType (ScMatValType nType) |
String, but not empty or empty path or any other type. More... | |
static bool | IsEmptyType (ScMatValType nType) |
Empty, but not empty path or any other type. More... | |
static bool | IsEmptyPathType (ScMatValType nType) |
Empty path, but not empty or any other type. More... | |
Private Member Functions | |
ScMatrix (const ScMatrix &)=delete | |
ScMatrix & | operator= (const ScMatrix &)=delete |
Private Attributes | |
size_t | nRefCnt |
bool | mbCloneIfConst |
std::unique_ptr< ScMatrixImpl > | pImpl |
Friends | |
class | ScMatrixImpl |
Matrix data type that can store values of mixed types.
Each element can be one of the following types: numeric, string, boolean, empty, and empty path.
Definition at line 100 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t, bool)> ScMatrix::BoolOpFunction |
Definition at line 118 of file scmatrix.hxx.
typedef std::function<double(double, double)> ScMatrix::CalculateOpFunction |
Definition at line 121 of file scmatrix.hxx.
typedef IterateResult<double> ScMatrix::DoubleIterateResult |
Definition at line 157 of file scmatrix.hxx.
typedef IterateResultMultiple<double> ScMatrix::DoubleIterateResultMultiple |
Definition at line 142 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t, double)> ScMatrix::DoubleOpFunction |
Definition at line 117 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t)> ScMatrix::EmptyOpFunction |
Definition at line 120 of file scmatrix.hxx.
Definition at line 156 of file scmatrix.hxx.
Definition at line 141 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t, svl::SharedString)> ScMatrix::StringOpFunction |
Definition at line 119 of file scmatrix.hxx.
|
privatedelete |
Referenced by Clone(), and CloneAndExtend().
Definition at line 3061 of file scmatrix.cxx.
References CreateDoubleError(), IsSizeAllocatable(), pImpl, and ScMatrixImpl.
Definition at line 3071 of file scmatrix.cxx.
References CreateDoubleError(), IsSizeAllocatable(), pImpl, and ScMatrixImpl.
ScMatrix::ScMatrix | ( | size_t | nC, |
size_t | nR, | ||
const std::vector< double > & | rInitVals | ||
) |
Definition at line 3081 of file scmatrix.cxx.
References CreateDoubleError(), IsSizeAllocatable(), pImpl, and ScMatrixImpl.
ScMatrix::~ScMatrix | ( | ) |
Definition at line 3091 of file scmatrix.cxx.
void ScMatrix::AddOp | ( | double | fVal, |
const ScMatrix & | rMat | ||
) |
Definition at line 3546 of file scmatrix.cxx.
double ScMatrix::And | ( | ) | const |
Definition at line 3383 of file scmatrix.cxx.
References pImpl.
ScMatrix * ScMatrix::Clone | ( | ) | const |
Clone the matrix.
Definition at line 3095 of file scmatrix.cxx.
References MatCopy(), pImpl, ScMatrix(), and SetErrorInterpreter().
Referenced by CloneIfConst().
Clone the matrix and extend it to the new size.
nNewCols and nNewRows MUST be at least of the size of the original matrix.
Definition at line 3130 of file scmatrix.cxx.
References MatCopy(), pImpl, ScMatrix(), and SetErrorInterpreter().
ScMatrix * ScMatrix::CloneIfConst | ( | ) |
Clone the matrix if mbCloneIfConst (immutable) is set, otherwise return this matrix, to be assigned to a ScMatrixRef.
Definition at line 3105 of file scmatrix.cxx.
References Clone(), and mbCloneIfConst.
ScMatrix::KahanIterateResultMultiple ScMatrix::CollectKahan | ( | const std::vector< sc::op::kOp > & | aOp | ) |
Definition at line 3615 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareEqual | ( | ) |
Definition at line 3353 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareGreater | ( | ) |
Definition at line 3368 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareGreaterEqual | ( | ) |
Definition at line 3378 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareLess | ( | ) |
Definition at line 3363 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareLessEqual | ( | ) |
Definition at line 3373 of file scmatrix.cxx.
References pImpl.
ScMatrixRef ScMatrix::CompareMatrix | ( | sc::Compare & | rComp, |
size_t | nMatPos, | ||
sc::CompareOptions * | pOptions | ||
) | const |
Definition at line 3449 of file scmatrix.cxx.
References pImpl.
Referenced by ScInterpreter::CompareMat().
void ScMatrix::CompareNotEqual | ( | ) |
Definition at line 3358 of file scmatrix.cxx.
References pImpl.
size_t ScMatrix::Count | ( | bool | bCountStrings, |
bool | bCountErrors, | ||
bool | bIgnoreEmptyStrings = false |
||
) | const |
Definition at line 3413 of file scmatrix.cxx.
References pImpl.
void ScMatrix::DecRef | ( | ) | const |
Definition at line 3008 of file scmatrix.cxx.
References nRefCnt.
Referenced by XclExpCachedMatrix::~XclExpCachedMatrix().
void ScMatrix::DivOp | ( | bool | bFlag, |
double | fVal, | ||
const ScMatrix & | rMat | ||
) |
Definition at line 3576 of file scmatrix.cxx.
void ScMatrix::ExecuteBinaryOp | ( | SCSIZE | nMaxCol, |
SCSIZE | nMaxRow, | ||
const ScMatrix & | rInputMat1, | ||
const ScMatrix & | rInputMat2, | ||
ScInterpreter * | pInterpreter, | ||
CalculateOpFunction | op | ||
) |
Apply binary operation to values from two input matrices, storing result into this matrix.
Definition at line 3633 of file scmatrix.cxx.
References pImpl.
void ScMatrix::ExecuteOperation | ( | const std::pair< size_t, size_t > & | rStartPos, |
const std::pair< size_t, size_t > & | rEndPos, | ||
DoubleOpFunction | aDoubleFunc, | ||
BoolOpFunction | aBoolFunc, | ||
StringOpFunction | aStringFunc, | ||
EmptyOpFunction | aEmptyFunc | ||
) | const |
Definition at line 3608 of file scmatrix.cxx.
References pImpl.
Definition at line 3323 of file scmatrix.cxx.
References pImpl.
ScMatrixValue ScMatrix::Get | ( | SCSIZE | nC, |
SCSIZE | nR | ||
) | const |
@ATTENTION: If bString the ScMatrixValue->pS may still be NULL to indicate an empty string!
Definition at line 3253 of file scmatrix.cxx.
References pImpl.
Referenced by ScInterpreter::CalculateMatrixValue(), XclImpExtName::CreateOleData(), XclExpFmlaCompImpl::ProcessMatrix(), XclExpCachedMatrix::Save(), ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteTable().
Definition at line 3143 of file scmatrix.cxx.
References pImpl.
Referenced by ScInterpreter::CalculateMatrixValue(), ScInterpreter::ConvertMatrixParameters(), XclImpExtName::CreateOleData(), ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDocument::FillMatrix(), XclExpCachedMatrix::GetDimensions(), ScFormulaCell::GetResultDimensions(), lcl_MatrixCalculation(), XclExpFmlaCompImpl::ProcessMatrix(), ExcelToSc::ReadExtensionArray(), ScInterpreter::ScDde(), ScInterpreter::ScFilterXML(), ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteTable().
Definition at line 3223 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScMatrixImpl::ExecuteBinaryOp(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(), lcl_LUP_decompose(), lcl_LUP_solve(), lcl_storeJumpMatResult(), and ScInterpreter::ScMatInv().
double ScMatrix::GetDouble | ( | SCSIZE | nIndex | ) | const |
Definition at line 3228 of file scmatrix.cxx.
void ScMatrix::GetDoubleArray | ( | std::vector< double > & | rArray, |
bool | bEmptyAsZero = true |
||
) | const |
Convert the content of matrix into a linear array of numeric values.
String elements are mapped to NaN's and empty elements are mapped to either NaN or zero values.
bEmptyAsZero | if true empty elements are mapped to zero values, otherwise they become NaN values. |
Definition at line 3455 of file scmatrix.cxx.
References pImpl.
Definition at line 3233 of file scmatrix.cxx.
References pImpl.
SCSIZE ScMatrix::GetElementCount | ( | ) | const |
Definition at line 3148 of file scmatrix.cxx.
References pImpl.
FormulaError ScMatrix::GetError | ( | SCSIZE | nC, |
SCSIZE | nR | ||
) | const |
May be used before obtaining the double value of an element to avoid passing its NAN around.
@ATTENTION: MUST NOT be used if the element is a string! Use GetErrorIfNotString() instead if not sure.
Definition at line 3218 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix().
|
inline |
Use in ScInterpreter to obtain the error code, if any.
Definition at line 296 of file scmatrix.hxx.
References GetError().
Referenced by ScMatrixImpl::ExecuteBinaryOp().
double ScMatrix::GetGcd | ( | ) | const |
Definition at line 3438 of file scmatrix.cxx.
References pImpl.
double ScMatrix::GetLcm | ( | ) | const |
Definition at line 3443 of file scmatrix.cxx.
References pImpl.
double ScMatrix::GetMaxValue | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3428 of file scmatrix.cxx.
References pImpl.
double ScMatrix::GetMinValue | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3433 of file scmatrix.cxx.
References pImpl.
svl::SharedString ScMatrix::GetString | ( | SCSIZE | nC, |
SCSIZE | nR | ||
) | const |
Definition at line 3238 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScMatrixImpl::ExecuteBinaryOp(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(), and lcl_storeJumpMatResult().
svl::SharedString ScMatrix::GetString | ( | SCSIZE | nIndex | ) | const |
Definition at line 3243 of file scmatrix.cxx.
svl::SharedString ScMatrix::GetString | ( | SvNumberFormatter & | rFormatter, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) | const |
Definition at line 3248 of file scmatrix.cxx.
References pImpl.
void ScMatrix::IncRef | ( | ) | const |
Definition at line 3003 of file scmatrix.cxx.
References nRefCnt.
Referenced by TokenPool::StoreMatrix(), and XclExpCachedMatrix::XclExpCachedMatrix().
Definition at line 3303 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), and ScChart2DataSequence::FillCacheFromExternalRef().
|
inlinestatic |
Boolean.
Definition at line 173 of file scmatrix.hxx.
References Boolean, and nType.
Referenced by XclExpFmlaCompImpl::ProcessMatrix().
Definition at line 3268 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), and lcl_storeJumpMatResult().
Definition at line 3273 of file scmatrix.cxx.
References pImpl.
Definition at line 3283 of file scmatrix.cxx.
References pImpl.
|
inlinestatic |
Empty path, but not empty or any other type.
Definition at line 199 of file scmatrix.hxx.
References EmptyPath, NonvalueMask, and nType.
Referenced by ScInterpreter::ScMatRef().
Definition at line 3278 of file scmatrix.cxx.
References pImpl.
|
inlinestatic |
Empty, but not empty path or any other type.
Definition at line 193 of file scmatrix.hxx.
References Empty, NonvalueMask, and nType.
Referenced by ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteCell().
|
inlinestatic |
String, empty or empty path, but not value nor boolean.
Definition at line 179 of file scmatrix.hxx.
References NonvalueMask, and nType.
Referenced by ScInterpreter::CalculateMatrixValue(), ScInterpreter::FillEntry(), ScValidationData::GetSelectionFromFormula(), ScInterpreter::QueryMatrixType(), XclExpCachedMatrix::Save(), ScInterpreter::ScMatch(), ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteCell().
bool ScMatrix::IsNumeric | ( | ) | const |
Definition at line 3308 of file scmatrix.cxx.
References pImpl.
|
inlinestatic |
String, but not empty or empty path or any other type.
Not named IsStringType to prevent confusion because previously IsNonValueType was named IsStringType.
Definition at line 187 of file scmatrix.hxx.
References NonvalueMask, nType, and String.
Referenced by ScInterpreter::IterateParametersIf(), ScInterpreter::IterateParametersIfs(), ScInterpreter::ScCountIf(), and ScInterpreter::ScHyperLink().
Checks nC or nR for zero and uses GetElementsMax() whether a matrix of the size of nC*nR could be allocated.
A zero size (both nC and nR zero) matrix is allowed for later resize.
Definition at line 3015 of file scmatrix.cxx.
References bElementsMaxFetched, GetElementsMax(), nElementsMax, SAL_WARN, and SAL_WARN_IF.
Referenced by ScInterpreter::CreateMatrixFromDoubleRef(), ScMatrixImpl::Resize(), ScInterpreter::ScEMat(), ScInterpreter::ScMatDet(), ScInterpreter::ScMatInv(), and ScMatrix().
Definition at line 3263 of file scmatrix.cxx.
References pImpl.
bool ScMatrix::IsStringOrEmpty | ( | SCSIZE | nIndex | ) | const |
Definition at line 3258 of file scmatrix.cxx.
Referenced by ScCompiler::CreateStringFromMatrix(), ScMatrixImpl::ExecuteBinaryOp(), ScChart2DataSequence::FillCacheFromExternalRef(), and ScDBQueryDataIterator::DataAccessMatrix::getCurrent().
bool ScMatrix::IsValue | ( | SCSIZE | nIndex | ) | const |
Definition at line 3288 of file scmatrix.cxx.
Referenced by ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), and lcl_storeJumpMatResult().
Definition at line 3298 of file scmatrix.cxx.
References pImpl.
Referenced by ScMatrixImpl::ExecuteBinaryOp().
|
inlinestatic |
Value or boolean.
Definition at line 167 of file scmatrix.hxx.
References Boolean, and nType.
Referenced by ScInterpreter::GetDoubleOrString(), ScInterpreter::GetDoubleOrStringFromMatrix(), XclExpFmlaCompImpl::ProcessMatrix(), ScInterpreter::ScHyperLink(), ScInterpreter::ScSwitch_MS(), and ScInterpreter::ScT().
size_t ScMatrix::MatchDoubleInColumns | ( | double | fValue, |
size_t | nCol1, | ||
size_t | nCol2 | ||
) | const |
Definition at line 3418 of file scmatrix.cxx.
References pImpl.
size_t ScMatrix::MatchStringInColumns | ( | const svl::SharedString & | rStr, |
size_t | nCol1, | ||
size_t | nCol2 | ||
) | const |
Definition at line 3423 of file scmatrix.cxx.
References pImpl.
void ScMatrix::MatConcat | ( | SCSIZE | nMaxCol, |
SCSIZE | nMaxRow, | ||
const ScMatrixRef & | xMat1, | ||
const ScMatrixRef & | xMat2, | ||
SvNumberFormatter & | rFormatter, | ||
svl::SharedStringPool & | rPool | ||
) |
Definition at line 3627 of file scmatrix.cxx.
References pImpl.
void ScMatrix::MatCopy | ( | const ScMatrix & | mRes | ) | const |
Definition at line 3313 of file scmatrix.cxx.
References pImpl.
Referenced by Clone(), CloneAndExtend(), and ScInterpreter::ScDde().
void ScMatrix::MatTrans | ( | const ScMatrix & | mRes | ) | const |
Definition at line 3318 of file scmatrix.cxx.
References pImpl.
void ScMatrix::MergeDoubleArrayMultiply | ( | std::vector< double > & | rArray | ) | const |
Definition at line 3460 of file scmatrix.cxx.
References pImpl.
void ScMatrix::MulOp | ( | double | fVal, |
const ScMatrix & | rMat | ||
) |
Definition at line 3569 of file scmatrix.cxx.
void ScMatrix::NegOp | ( | const ScMatrix & | rMat | ) |
Definition at line 3539 of file scmatrix.cxx.
void ScMatrix::NotOp | ( | const ScMatrix & | rMat | ) |
Definition at line 3532 of file scmatrix.cxx.
double ScMatrix::Or | ( | ) | const |
Definition at line 3388 of file scmatrix.cxx.
References pImpl.
void ScMatrix::PowOp | ( | bool | bFlag, |
double | fVal, | ||
const ScMatrix & | rMat | ||
) |
Definition at line 3592 of file scmatrix.cxx.
References a, pImpl, and sc::power().
ScMatrix::DoubleIterateResult ScMatrix::Product | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3408 of file scmatrix.cxx.
References pImpl.
Definition at line 3213 of file scmatrix.cxx.
References pImpl.
Referenced by ScTokenArray::MergeArray(), and ExcelToSc::ReadExtensionArray().
Definition at line 3178 of file scmatrix.cxx.
References pImpl.
Definition at line 3168 of file scmatrix.cxx.
References pImpl.
Referenced by lcl_LUP_decompose(), ScTokenArray::MergeArray(), and ExcelToSc::ReadExtensionArray().
void ScMatrix::PutDouble | ( | double | fVal, |
SCSIZE | nIndex | ||
) |
Definition at line 3173 of file scmatrix.cxx.
Put a column vector of doubles, starting at row nR, must fit into dimensions.
Definition at line 3328 of file scmatrix.cxx.
References pImpl.
Definition at line 3198 of file scmatrix.cxx.
References pImpl.
Referenced by ScTokenArray::MergeArray(), and ExcelToSc::ReadExtensionArray().
Put a column vector of empty paths, starting at row nR, must fit into dimensions.
Definition at line 3348 of file scmatrix.cxx.
Put a column vector of empty results, starting at row nR, must fit into dimensions.
Definition at line 3343 of file scmatrix.cxx.
Put a column vector of empties, starting at row nR, must fit into dimensions.
Definition at line 3338 of file scmatrix.cxx.
void ScMatrix::PutError | ( | FormulaError | nErrorCode, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Definition at line 3208 of file scmatrix.cxx.
References pImpl.
Referenced by ExcelToSc::ReadExtensionArray().
void ScMatrix::PutString | ( | const svl::SharedString & | rStr, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Definition at line 3183 of file scmatrix.cxx.
References pImpl.
Referenced by ScTokenArray::MergeArray(), and ExcelToSc::ReadExtensionArray().
void ScMatrix::PutString | ( | const svl::SharedString & | rStr, |
SCSIZE | nIndex | ||
) |
Definition at line 3188 of file scmatrix.cxx.
void ScMatrix::PutString | ( | const svl::SharedString * | pArray, |
size_t | nLen, | ||
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Definition at line 3193 of file scmatrix.cxx.
References pImpl.
void ScMatrix::PutStringVector | ( | const ::std::vector< svl::SharedString > & | rVec, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Put a column vector of strings, starting at row nR, must fit into dimensions.
Definition at line 3333 of file scmatrix.cxx.
References pImpl.
Resize the matrix to specified new dimension.
Definition at line 3120 of file scmatrix.cxx.
References pImpl.
Referenced by ExcelToSc::ReadExtensionArray().
Definition at line 3125 of file scmatrix.cxx.
References pImpl.
void ScMatrix::SetErrorInterpreter | ( | ScInterpreter * | p | ) |
Definition at line 3138 of file scmatrix.cxx.
Referenced by Clone(), CloneAndExtend(), and ScInterpreter::PopMatrix().
void ScMatrix::SetImmutable | ( | ) | const |
Set the matrix to immutable for CloneIfConst(), only the interpreter should do this and know the consequences.
Definition at line 3115 of file scmatrix.cxx.
References mbCloneIfConst.
void ScMatrix::SetMutable | ( | ) |
Set the matrix to mutable for CloneIfConst(), only the interpreter should do this and know the consequences.
Definition at line 3110 of file scmatrix.cxx.
References mbCloneIfConst.
void ScMatrix::SubOp | ( | bool | bFlag, |
double | fVal, | ||
const ScMatrix & | rMat | ||
) |
Definition at line 3553 of file scmatrix.cxx.
ScMatrix::KahanIterateResult ScMatrix::Sum | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3398 of file scmatrix.cxx.
References pImpl.
ScMatrix::KahanIterateResult ScMatrix::SumSquare | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3403 of file scmatrix.cxx.
References pImpl.
Definition at line 3153 of file scmatrix.cxx.
References pImpl.
Referenced by ValidColRowOrReplicated().
Checks if the matrix position is within the matrix.
If it is not, for a row vector or column vector the position is adapted such that it points to an element to be replicated, same column row 0 for a row vector, same row column 0 for a column vector. Else, for a 2D matrix and position not within matrix, returns false.
Definition at line 3163 of file scmatrix.cxx.
References ValidColRow(), and ValidColRowReplicated().
For a row vector or column vector, if the position does not point into the vector but is a valid column or row offset it is adapted such that it points to an element to be replicated, same column row 0 for a row vector, same row column 0 for a column vector.
Else, for a 2D matrix, returns false.
Definition at line 3158 of file scmatrix.cxx.
References pImpl.
Referenced by ValidColRowOrReplicated().
double ScMatrix::Xor | ( | ) | const |
Definition at line 3393 of file scmatrix.cxx.
References pImpl.
|
friend |
Definition at line 102 of file scmatrix.hxx.
Referenced by ScMatrix().
|
mutableprivate |
Definition at line 105 of file scmatrix.hxx.
Referenced by CloneIfConst(), SetImmutable(), and SetMutable().
|
mutableprivate |
Definition at line 104 of file scmatrix.hxx.
|
private |
Definition at line 106 of file scmatrix.hxx.
Referenced by AddOp(), And(), Clone(), CloneAndExtend(), CollectKahan(), CompareEqual(), CompareGreater(), CompareGreaterEqual(), CompareLess(), CompareLessEqual(), CompareMatrix(), CompareNotEqual(), Count(), DivOp(), ExecuteBinaryOp(), ScMatrixImpl::ExecuteBinaryOp(), ExecuteOperation(), FillDouble(), Get(), GetDimensions(), GetDouble(), GetDoubleArray(), GetDoubleWithStringConversion(), GetElementCount(), GetError(), GetGcd(), GetLcm(), GetMaxValue(), GetMinValue(), GetString(), IsBoolean(), IsEmpty(), IsEmptyCell(), IsEmptyPath(), IsEmptyResult(), IsNumeric(), IsStringOrEmpty(), IsValue(), IsValueOrEmpty(), MatchDoubleInColumns(), MatchStringInColumns(), MatConcat(), MatCopy(), MatTrans(), MergeDoubleArrayMultiply(), MulOp(), NegOp(), NotOp(), Or(), PowOp(), Product(), PutBoolean(), PutDouble(), PutDoubleVector(), PutEmpty(), PutEmptyPath(), PutEmptyPathVector(), PutEmptyResultVector(), PutEmptyVector(), PutError(), PutString(), PutStringVector(), Resize(), ScMatrix(), SetErrorInterpreter(), SubOp(), Sum(), SumSquare(), ValidColRow(), ValidColRowReplicated(), and Xor().