summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorŁukasz Hryniuk <lukasz.hryniuk@wp.pl>2015-03-04 22:12:11 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-03-09 21:30:44 +0000
commit1c2405ba44c5a146188c19e235f857ab18ea05f0 (patch)
treed076b8f686fc8c3ef69cd1c7e42e65f1771cc788 /sc/inc
parente96a5d4064a6002eb95b2c05f4e68c79bb766b07 (diff)
tdf#89387 General functor and basic operations
Add a functor MatOp and ScMatrix methods for scalar-matrix operations, both unary and binary. It can be used for operations which modify each element for the matrix (in constrast to accumulating ones, like ScGCD or ScAmpersand). Split method for addition and substraction into two methods for consistency and simplicity. Change-Id: Ic040233429ee120ac325d7baf31a70bba232041d Reviewed-on: https://gerrit.libreoffice.org/14749 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/scmatrix.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 255d45219017..e85054e22b52 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -387,7 +387,13 @@ public:
void GetDoubleArray( std::vector<double>& rArray, bool bEmptyAsZero = true ) const;
void MergeDoubleArray( std::vector<double>& rArray, Op eOp ) const;
- void SubAddOp(bool bSub, double fVal, svl::SharedString aString, ScMatrix& rMat);
+ void NotOp(svl::SharedString aString, ScMatrix& rMat);
+ void NegOp(svl::SharedString aString, ScMatrix& rMat);
+ void AddOp(svl::SharedString aString, double fVal, ScMatrix& rMat);
+ void SubOp(bool bFlag, svl::SharedString aString, double fVal, ScMatrix& rMat);
+ void MulOp(svl::SharedString aString, double fVal, ScMatrix& rMat);
+ void DivOp(bool bFlag, svl::SharedString aString, double fVal, ScMatrix& rMat);
+ void PowOp(bool bFlag, svl::SharedString aString, double fVal, ScMatrix& rMat);
ScMatrix& operator+= ( const ScMatrix& r );