Bump version to 6.4-15
[LibreOffice.git] / sc / inc / matrixoperators.hxx
blobaea82b5bc36a8f9d5128121b13ebea711b77a24d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_SC_INC_MATRIXOPERATORS_HXX
11 #define INCLUDED_SC_INC_MATRIXOPERATORS_HXX
14 #include <functional>
16 namespace sc {
18 namespace op {
21 template<typename T>
22 struct Op_
24 const double mInitVal;
25 const T maOp;
26 Op_(double InitVal, T aOp):
27 mInitVal(InitVal), maOp(aOp)
30 void operator()(double& rAccum, double fVal) const
32 maOp(rAccum, fVal);
36 using Op = Op_<std::function<void(double&, double)>>;
38 struct Sum
40 static const double InitVal;
41 void operator()(double& rAccum, double fVal) const;
44 struct SumSquare
46 static const double InitVal;
47 void operator()(double& rAccum, double fVal) const;
50 struct Product
52 static const double InitVal;
53 void operator()(double& rAccum, double fVal) const;
60 #endif
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */