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 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 |
: 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) |
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 112 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t, bool)> ScMatrix::BoolOpFunction |
Definition at line 130 of file scmatrix.hxx.
typedef IterateResult<double> ScMatrix::DoubleIterateResult |
Definition at line 168 of file scmatrix.hxx.
typedef IterateResultMultiple<double> ScMatrix::DoubleIterateResultMultiple |
Definition at line 153 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t, double)> ScMatrix::DoubleOpFunction |
Definition at line 129 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t)> ScMatrix::EmptyOpFunction |
Definition at line 132 of file scmatrix.hxx.
Definition at line 167 of file scmatrix.hxx.
Definition at line 152 of file scmatrix.hxx.
typedef std::function<void(size_t, size_t, svl::SharedString)> ScMatrix::StringOpFunction |
Definition at line 131 of file scmatrix.hxx.
|
privatedelete |
Referenced by Clone(), and CloneAndExtend().
Definition at line 2848 of file scmatrix.cxx.
References CreateDoubleError(), IsSizeAllocatable(), pImpl, and ScMatrixImpl.
Definition at line 2858 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 2868 of file scmatrix.cxx.
References CreateDoubleError(), IsSizeAllocatable(), pImpl, and ScMatrixImpl.
ScMatrix::~ScMatrix | ( | ) |
Definition at line 2878 of file scmatrix.cxx.
Definition at line 3333 of file scmatrix.cxx.
double ScMatrix::And | ( | ) | const |
Definition at line 3170 of file scmatrix.cxx.
References pImpl.
ScMatrix * ScMatrix::Clone | ( | ) | const |
Clone the matrix.
Definition at line 2882 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 2917 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 2892 of file scmatrix.cxx.
References Clone(), and mbCloneIfConst.
ScMatrix::KahanIterateResultMultiple ScMatrix::CollectKahan | ( | const std::vector< sc::op::kOp > & | aOp | ) |
Definition at line 3402 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareEqual | ( | ) |
Definition at line 3140 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareGreater | ( | ) |
Definition at line 3155 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareGreaterEqual | ( | ) |
Definition at line 3165 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareLess | ( | ) |
Definition at line 3150 of file scmatrix.cxx.
References pImpl.
void ScMatrix::CompareLessEqual | ( | ) |
Definition at line 3160 of file scmatrix.cxx.
References pImpl.
ScMatrixRef ScMatrix::CompareMatrix | ( | sc::Compare & | rComp, |
size_t | nMatPos, | ||
sc::CompareOptions * | pOptions | ||
) | const |
Definition at line 3236 of file scmatrix.cxx.
References pImpl.
Referenced by ScInterpreter::CompareMat().
void ScMatrix::CompareNotEqual | ( | ) |
Definition at line 3145 of file scmatrix.cxx.
References pImpl.
size_t ScMatrix::Count | ( | bool | bCountStrings, |
bool | bCountErrors, | ||
bool | bIgnoreEmptyStrings = false |
||
) | const |
Definition at line 3200 of file scmatrix.cxx.
References pImpl.
void ScMatrix::DecRef | ( | ) | const |
Definition at line 2795 of file scmatrix.cxx.
Referenced by intrusive_ptr_release(), and XclExpCachedMatrix::~XclExpCachedMatrix().
Definition at line 3363 of file scmatrix.cxx.
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 3395 of file scmatrix.cxx.
References pImpl.
Definition at line 3110 of file scmatrix.cxx.
References pImpl.
ScMatrixValue ScMatrix::Get | ( | SCSIZE | nC, |
SCSIZE | nR | ||
) | const |
: If bString the ScMatrixValue->pS may still be NULL to indicate an empty string!
Definition at line 3040 of file scmatrix.cxx.
References pImpl.
Referenced by ScInterpreter::CalculateMatrixValue(), XclImpExtName::CreateOleData(), ScValidationData::GetSelectionFromFormula(), XclExpFmlaCompImpl::ProcessMatrix(), XclExpCachedMatrix::Save(), ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteTable().
Definition at line 2930 of file scmatrix.cxx.
References pImpl.
Referenced by ScInterpreter::CalculateMatrixValue(), ScInterpreter::ConvertMatrixParameters(), XclImpExtName::CreateOleData(), ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDocument::FillMatrix(), XclExpCachedMatrix::GetDimensions(), ScFormulaCell::GetResultDimensions(), ScValidationData::GetSelectionFromFormula(), lcl_MatrixCalculation(), XclExpFmlaCompImpl::ProcessMatrix(), ExcelToSc::ReadExtensionArray(), ScInterpreter::ScDde(), ScInterpreter::ScFilterXML(), ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteTable().
Definition at line 3010 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(), lcl_LUP_decompose(), lcl_LUP_solve(), lcl_MatrixCalculation(), lcl_storeJumpMatResult(), and ScInterpreter::ScMatInv().
double ScMatrix::GetDouble | ( | SCSIZE | nIndex | ) | const |
Definition at line 3015 of file scmatrix.cxx.
References pImpl.
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 3242 of file scmatrix.cxx.
References pImpl.
Definition at line 3020 of file scmatrix.cxx.
References pImpl.
SCSIZE ScMatrix::GetElementCount | ( | ) | const |
Definition at line 2935 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.
: MUST NOT be used if the element is a string! Use GetErrorIfNotString() instead if not sure.
Definition at line 3005 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix().
|
inline |
Use in ScInterpreter to obtain the error code, if any.
Definition at line 307 of file scmatrix.hxx.
References GetError().
Referenced by lcl_MatrixCalculation().
double ScMatrix::GetGcd | ( | ) | const |
Definition at line 3225 of file scmatrix.cxx.
References pImpl.
double ScMatrix::GetLcm | ( | ) | const |
Definition at line 3230 of file scmatrix.cxx.
References pImpl.
double ScMatrix::GetMaxValue | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3215 of file scmatrix.cxx.
References pImpl.
double ScMatrix::GetMinValue | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3220 of file scmatrix.cxx.
References pImpl.
svl::SharedString ScMatrix::GetString | ( | SCSIZE | nC, |
SCSIZE | nR | ||
) | const |
Definition at line 3025 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(), lcl_MatrixCalculation(), and lcl_storeJumpMatResult().
svl::SharedString ScMatrix::GetString | ( | SCSIZE | nIndex | ) | const |
Definition at line 3030 of file scmatrix.cxx.
References pImpl.
svl::SharedString ScMatrix::GetString | ( | SvNumberFormatter & | rFormatter, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) | const |
Definition at line 3035 of file scmatrix.cxx.
References pImpl.
void ScMatrix::IncRef | ( | ) | const |
Definition at line 2790 of file scmatrix.cxx.
Referenced by intrusive_ptr_add_ref(), TokenPool::StoreMatrix(), and XclExpCachedMatrix::XclExpCachedMatrix().
Definition at line 3090 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), and ScChart2DataSequence::FillCacheFromExternalRef().
|
inlinestatic |
Boolean.
Definition at line 184 of file scmatrix.hxx.
References Boolean.
Referenced by XclExpFmlaCompImpl::ProcessMatrix().
Definition at line 3055 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), and lcl_storeJumpMatResult().
Definition at line 3060 of file scmatrix.cxx.
References pImpl.
Definition at line 3070 of file scmatrix.cxx.
References pImpl.
|
inlinestatic |
Empty path, but not empty or any other type.
Definition at line 210 of file scmatrix.hxx.
References EmptyPath, and NonvalueMask.
Referenced by ScInterpreter::ScMatRef().
Definition at line 3065 of file scmatrix.cxx.
References pImpl.
|
inlinestatic |
Empty, but not empty path or any other type.
Definition at line 204 of file scmatrix.hxx.
References Empty, and NonvalueMask.
Referenced by ScInterpreter::ScMatRef(), and ScXMLExportDDELinks::WriteCell().
|
inlinestatic |
String, empty or empty path, but not value nor boolean.
Definition at line 190 of file scmatrix.hxx.
References NonvalueMask.
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 3095 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 198 of file scmatrix.hxx.
References NonvalueMask, 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 2802 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().
bool ScMatrix::IsStringOrEmpty | ( | SCSIZE | nIndex | ) | const |
Definition at line 3045 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), ScDBQueryDataIterator::DataAccessMatrix::getCurrent(), and lcl_MatrixCalculation().
Definition at line 3050 of file scmatrix.cxx.
References pImpl.
bool ScMatrix::IsValue | ( | SCSIZE | nIndex | ) | const |
Definition at line 3075 of file scmatrix.cxx.
References pImpl.
Referenced by ScCompiler::CreateStringFromMatrix(), ScChart2DataSequence::FillCacheFromExternalRef(), and lcl_storeJumpMatResult().
Definition at line 3085 of file scmatrix.cxx.
References pImpl.
Referenced by lcl_MatrixCalculation().
|
inlinestatic |
Value or boolean.
Definition at line 178 of file scmatrix.hxx.
References Boolean.
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 3205 of file scmatrix.cxx.
References pImpl.
size_t ScMatrix::MatchStringInColumns | ( | const svl::SharedString & | rStr, |
size_t | nCol1, | ||
size_t | nCol2 | ||
) | const |
Definition at line 3210 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 3414 of file scmatrix.cxx.
References pImpl.
Definition at line 3100 of file scmatrix.cxx.
References pImpl.
Referenced by Clone(), CloneAndExtend(), and ScInterpreter::ScDde().
Definition at line 3105 of file scmatrix.cxx.
References pImpl.
void ScMatrix::MergeDoubleArrayMultiply | ( | std::vector< double > & | rArray | ) | const |
Definition at line 3247 of file scmatrix.cxx.
References pImpl.
Definition at line 3356 of file scmatrix.cxx.
Definition at line 3326 of file scmatrix.cxx.
Definition at line 3319 of file scmatrix.cxx.
double ScMatrix::Or | ( | ) | const |
Definition at line 3175 of file scmatrix.cxx.
References pImpl.
Definition at line 3379 of file scmatrix.cxx.
References a, pImpl, and sc::power().
ScMatrix::DoubleIterateResult ScMatrix::Product | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3195 of file scmatrix.cxx.
References pImpl.
Definition at line 3000 of file scmatrix.cxx.
References pImpl.
Referenced by ScTokenArray::MergeArray(), and ExcelToSc::ReadExtensionArray().
Definition at line 2955 of file scmatrix.cxx.
References pImpl.
Referenced by lcl_LUP_decompose(), ScTokenArray::MergeArray(), and ExcelToSc::ReadExtensionArray().
Definition at line 2960 of file scmatrix.cxx.
References pImpl.
Definition at line 2965 of file scmatrix.cxx.
References pImpl.
Put a column vector of doubles, starting at row nR, must fit into dimensions.
Definition at line 3115 of file scmatrix.cxx.
References pImpl.
Definition at line 2985 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 3135 of file scmatrix.cxx.
References pImpl.
Put a column vector of empty results, starting at row nR, must fit into dimensions.
Definition at line 3130 of file scmatrix.cxx.
References pImpl.
Put a column vector of empties, starting at row nR, must fit into dimensions.
Definition at line 3125 of file scmatrix.cxx.
References pImpl.
void ScMatrix::PutError | ( | FormulaError | nErrorCode, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Definition at line 2995 of file scmatrix.cxx.
References pImpl.
Referenced by ExcelToSc::ReadExtensionArray().
void ScMatrix::PutString | ( | const svl::SharedString & | rStr, |
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Definition at line 2970 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 2975 of file scmatrix.cxx.
References pImpl.
void ScMatrix::PutString | ( | const svl::SharedString * | pArray, |
size_t | nLen, | ||
SCSIZE | nC, | ||
SCSIZE | nR | ||
) |
Definition at line 2980 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 3120 of file scmatrix.cxx.
References pImpl.
Resize the matrix to specified new dimension.
Definition at line 2907 of file scmatrix.cxx.
References pImpl.
Referenced by ExcelToSc::ReadExtensionArray().
Definition at line 2912 of file scmatrix.cxx.
References pImpl.
void ScMatrix::SetErrorInterpreter | ( | ScInterpreter * | p | ) |
Definition at line 2925 of file scmatrix.cxx.
References pImpl.
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 2902 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 2897 of file scmatrix.cxx.
References mbCloneIfConst.
Definition at line 3340 of file scmatrix.cxx.
ScMatrix::KahanIterateResult ScMatrix::Sum | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3185 of file scmatrix.cxx.
References pImpl.
ScMatrix::KahanIterateResult ScMatrix::SumSquare | ( | bool | bTextAsZero, |
bool | bIgnoreErrorValues = false |
||
) | const |
Definition at line 3190 of file scmatrix.cxx.
References pImpl.
Definition at line 2940 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 2950 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 2945 of file scmatrix.cxx.
References pImpl.
Referenced by ValidColRowOrReplicated().
double ScMatrix::Xor | ( | ) | const |
Definition at line 3180 of file scmatrix.cxx.
References pImpl.
|
friend |
Definition at line 114 of file scmatrix.hxx.
Referenced by ScMatrix().
|
mutableprivate |
Definition at line 117 of file scmatrix.hxx.
Referenced by CloneIfConst(), SetImmutable(), and SetMutable().
|
mutableprivate |
Definition at line 116 of file scmatrix.hxx.
|
private |
Definition at line 118 of file scmatrix.hxx.
Referenced by AddOp(), And(), Clone(), CloneAndExtend(), CollectKahan(), CompareEqual(), CompareGreater(), CompareGreaterEqual(), CompareLess(), CompareLessEqual(), CompareMatrix(), CompareNotEqual(), Count(), DivOp(), 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().