nss: upgrade to release 3.73
[LibreOffice.git] / sc / inc / matrixoperators.hxx
blobc6ec7a4a5d198d51413cdc4da35b3404f734d259
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::op {
19 template<typename T>
20 struct Op_
22 const double mInitVal;
23 const T maOp;
24 Op_(double InitVal, T aOp):
25 mInitVal(InitVal), maOp(aOp)
28 void operator()(double& rAccum, double fVal) const
30 maOp(rAccum, fVal);
34 using Op = Op_<std::function<void(double&, double)>>;
36 struct Sum
38 static const double InitVal;
39 void operator()(double& rAccum, double fVal) const;
42 struct SumSquare
44 static const double InitVal;
45 void operator()(double& rAccum, double fVal) const;
48 struct Product
50 static const double InitVal;
51 void operator()(double& rAccum, double fVal) const;
58 #endif
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */