1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef SC_OPENCL_OP_STATISTICAL_HXX
11 #define SC_OPENCL_OP_STATISTICAL_HXX
15 namespace sc
{ namespace opencl
{
17 class OpStandard
: public Normal
20 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
21 const std::string sSymName
, SubArguments
&vSubArguments
);
22 virtual std::string
BinFuncName(void) const { return "Standard"; }
24 class OpExponDist
: public Normal
27 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
28 const std::string sSymName
, SubArguments
&vSubArguments
);
29 virtual std::string
BinFuncName(void) const { return "ExponDist"; }
31 class OpVar
: public Normal
34 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
35 const std::string sSymName
, SubArguments
&vSubArguments
);
36 virtual std::string
BinFuncName(void) const { return "Var"; }
38 class OpSTEYX
: public Normal
41 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
42 const std::string sSymName
, SubArguments
&vSubArguments
);
43 virtual std::string
BinFuncName(void) const { return "STEYX"; }
45 class OpVarP
: public Normal
48 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
49 const std::string sSymName
, SubArguments
&vSubArguments
);
50 virtual std::string
BinFuncName(void) const { return "VarP"; }
52 class OpZTest
: public Normal
55 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
56 const std::string sSymName
, SubArguments
&vSubArguments
);
57 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
58 virtual std::string
BinFuncName(void) const { return "ZTest"; }
60 class OpStDevP
: public Normal
63 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
64 const std::string sSymName
, SubArguments
&vSubArguments
);
65 virtual std::string
BinFuncName(void) const { return "StDevP"; }
68 class OpStDev
: public Normal
71 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
72 const std::string sSymName
, SubArguments
&vSubArguments
);
73 virtual std::string
BinFuncName(void) const { return "StDev"; }
75 class OpSkewp
: public Normal
78 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
79 const std::string sSymName
, SubArguments
&vSubArguments
);
80 virtual std::string
BinFuncName(void) const { return "Skewp"; }
82 class OpSlope
: public Normal
85 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
86 const std::string sSymName
, SubArguments
&vSubArguments
);
87 virtual std::string
BinFuncName(void) const { return "Slope"; }
89 class OpWeibull
: public Normal
92 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
93 const std::string sSymName
, SubArguments
&vSubArguments
);
94 virtual std::string
BinFuncName(void) const { return "Weibull"; }
96 class OpFdist
: public Normal
99 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
100 const std::string sSymName
, SubArguments
&vSubArguments
);
101 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
102 virtual std::string
BinFuncName(void) const { return "Fdist"; }
104 class OpTDist
: public Normal
107 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
108 const std::string sSymName
, SubArguments
&vSubArguments
);
109 virtual std::string
BinFuncName(void) const { return "TDist"; }
110 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
112 class OpTInv
: public Normal
115 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
116 const std::string sSymName
, SubArguments
&vSubArguments
);
117 virtual std::string
BinFuncName(void) const { return "TInv"; }
118 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
120 class OpTTest
: public Normal
123 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
124 const std::string sSymName
, SubArguments
&vSubArguments
);
125 virtual std::string
BinFuncName(void) const { return "TTest"; }
126 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
128 class OpSkew
: public Normal
131 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
132 const std::string sSymName
, SubArguments
&vSubArguments
);
133 virtual std::string
BinFuncName(void) const { return "Skew"; }
135 class OpFisher
: public Normal
138 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
139 const std::string sSymName
, SubArguments
&vSubArguments
);
140 virtual std::string
BinFuncName(void) const { return "Fisher"; }
143 class OpFisherInv
: public Normal
146 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
147 const std::string sSymName
, SubArguments
&vSubArguments
);
148 virtual std::string
BinFuncName(void) const { return "FisherInv"; }
151 class OpGamma
: public Normal
154 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
155 const std::string sSymName
, SubArguments
&vSubArguments
);
156 virtual std::string
BinFuncName(void) const { return "Gamma"; }
159 class OpCorrel
: public Normal
162 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
163 const std::string sSymName
, SubArguments
&vSubArguments
);
164 virtual std::string
BinFuncName(void) const { return "Correl"; }
167 class OpNegbinomdist
: public Normal
170 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
171 const std::string sSymName
, SubArguments
&vSubArguments
);
172 virtual std::string
BinFuncName(void) const { return "OpNegbinomdist"; }
175 class OpPearson
: public Normal
178 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
179 const std::string sSymName
, SubArguments
&vSubArguments
);
180 virtual std::string
BinFuncName(void) const { return "OpPearson"; }
183 class OpGammaLn
: public Normal
186 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
187 const std::string sSymName
, SubArguments
&vSubArguments
);
188 virtual std::string
BinFuncName(void) const { return "GammaLn"; }
191 class OpGauss
: public Normal
194 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
195 const std::string sSymName
, SubArguments
&vSubArguments
);
196 virtual void BinInlineFun(std::set
<std::string
>& ,
197 std::set
<std::string
>& );
198 virtual std::string
BinFuncName(void) const { return "Gauss"; }
201 class OpGeoMean
: public CheckVariables
204 OpGeoMean(void): CheckVariables(), mNeedReductionKernel(true) {}
205 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
206 const std::string sSymName
, SubArguments
&vSubArguments
);
207 virtual std::string
BinFuncName(void) const { return "GeoMean"; }
208 bool NeedReductionKernel(void) const { return mNeedReductionKernel
; }
210 bool mNeedReductionKernel
;
213 class OpHarMean
: public Normal
216 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
217 const std::string sSymName
, SubArguments
&vSubArguments
);
218 virtual std::string
BinFuncName(void) const { return "HarMean"; }
221 class OpRsq
: public Normal
224 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
225 const std::string sSymName
, SubArguments
&vSubArguments
);
226 virtual std::string
BinFuncName(void) const { return "OpRsq"; }
228 class OpNormdist
:public Normal
{
230 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
231 const std::string sSymName
, SubArguments
&vSubArguments
);
232 virtual std::string
BinFuncName(void) const { return "OpNormdist"; }
234 class OpMedian
:public Normal
{
236 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
237 const std::string sSymName
, SubArguments
&vSubArguments
);
238 virtual std::string
BinFuncName(void) const { return "OpMedian"; }
240 class OpNormsdist
:public Normal
{
242 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
243 const std::string sSymName
, SubArguments
&vSubArguments
);
244 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
245 virtual std::string
BinFuncName(void) const { return "OpNormsdist"; }
247 class OpNorminv
:public Normal
{
249 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
250 const std::string sSymName
, SubArguments
&vSubArguments
);
251 virtual std::string
BinFuncName(void) const { return "OpNorminv"; }
253 class OpNormsinv
:public Normal
{
255 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
256 const std::string sSymName
, SubArguments
&vSubArguments
);
257 virtual std::string
BinFuncName(void) const { return "OpNormsinv"; }
259 class OpPhi
:public Normal
{
261 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
262 const std::string sSymName
, SubArguments
&vSubArguments
);
263 virtual std::string
BinFuncName(void) const { return "OpPhi"; }
265 class OpKurt
: public Normal
268 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
269 const std::string sSymName
, SubArguments
&vSubArguments
);
270 virtual std::string
BinFuncName(void) const { return "Kurt"; }
272 class OpCovar
: public Normal
275 virtual void GenSlidingWindowFunction(std::stringstream
& ss
,
276 const std::string sSymName
, SubArguments
& vSubArguments
);
277 virtual std::string
BinFuncName(void) const { return "Covar"; }
280 class OpVariationen
:public Normal
{
282 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
283 const std::string sSymName
, SubArguments
&vSubArguments
);
284 virtual std::string
BinFuncName(void) const { return "OpVariationen"; }
286 class OpVariationen2
:public Normal
{
288 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
289 const std::string sSymName
, SubArguments
&vSubArguments
);
290 virtual std::string
BinFuncName(void) const { return "OpVariationen2";}
293 class OpConfidence
: public Normal
296 virtual std::string
GetBottom(void) { return "0"; }
298 virtual void GenSlidingWindowFunction(std::stringstream
& ss
,
299 const std::string sSymName
, SubArguments
& vSubArguments
);
300 virtual void BinInlineFun(std::set
<std::string
>& ,
301 std::set
<std::string
>& );
303 virtual std::string
BinFuncName(void) const { return "Confidence"; }
305 class OpIntercept
: public Normal
308 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
309 const std::string sSymName
, SubArguments
&vSubArguments
);
310 virtual std::string
BinFuncName(void) const { return "Intercept"; }
312 class OpLogInv
: public Normal
315 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
316 const std::string sSymName
, SubArguments
&vSubArguments
);
317 virtual std::string
BinFuncName(void) const { return "LogInv"; }
319 class OpCritBinom
: public Normal
322 virtual std::string
GetBottom(void) { return "0"; }
324 virtual void GenSlidingWindowFunction(std::stringstream
& ss
,
325 const std::string sSymName
, SubArguments
& vSubArguments
);
326 virtual void BinInlineFun(std::set
<std::string
>& ,
327 std::set
<std::string
>& );
329 virtual std::string
BinFuncName(void) const { return "CritBinom"; }
331 class OpForecast
: public Normal
334 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
335 const std::string sSymName
, SubArguments
&vSubArguments
);
336 virtual std::string
BinFuncName(void) const { return "Forecast"; }
338 class OpLogNormDist
: public Normal
341 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
342 const std::string sSymName
, SubArguments
&vSubArguments
);
343 virtual std::string
BinFuncName(void) const { return "LogNormdist"; }
345 class OpGammaDist
: public Normal
348 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
349 const std::string sSymName
, SubArguments
&vSubArguments
);
350 void BinInlineFun(std::set
<std::string
>& decls
,std::set
<std::string
>& funs
);
351 virtual std::string
BinFuncName(void) const { return "GammaDist"; }
353 class OpHypGeomDist
:public Normal
{
355 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
356 const std::string sSymName
, SubArguments
&vSubArguments
);
357 virtual std::string
BinFuncName(void) const { return "OpHypGeomDist"; }
359 class OpChiDist
:public Normal
{
361 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
362 const std::string sSymName
, SubArguments
&vSubArguments
);
363 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
364 virtual std::string
BinFuncName(void) const { return "OpChiDist"; }
366 class OpBinomdist
:public Normal
{
368 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
369 const std::string sSymName
, SubArguments
&vSubArguments
);
370 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
371 virtual std::string
BinFuncName(void) const { return "OpBinomdist"; }
373 class OpChiSqDist
: public CheckVariables
376 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
377 const std::string sSymName
, SubArguments
&vSubArguments
);
378 virtual std::string
BinFuncName(void) const { return "ChiSqDist"; }
379 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>& );
382 class OpChiSqInv
: public CheckVariables
385 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
386 const std::string sSymName
, SubArguments
&vSubArguments
);
387 virtual std::string
BinFuncName(void) const { return "ChiSqInv"; }
388 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>& );
390 class OpChiInv
:public Normal
{
392 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
393 const std::string sSymName
, SubArguments
&vSubArguments
);
394 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
395 virtual std::string
BinFuncName(void) const { return "OpChiInv"; }
397 class OpPoisson
:public Normal
{
399 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
400 const std::string sSymName
, SubArguments
&vSubArguments
);
401 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
402 virtual std::string
BinFuncName(void) const { return "OpPoisson"; }
405 class OpGammaInv
: public Normal
408 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
409 const std::string sSymName
, SubArguments
&vSubArguments
);
410 void BinInlineFun(std::set
<std::string
>& decls
,std::set
<std::string
>& funs
412 virtual std::string
BinFuncName(void) const { return "GammaInv"; }
414 class OpFInv
: public Normal
417 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
418 const std::string sSymName
, SubArguments
&vSubArguments
);
419 void BinInlineFun(std::set
<std::string
>& decls
,std::set
<std::string
>& funs
421 virtual std::string
BinFuncName(void) const { return "FInv"; }
423 class OpFTest
: public Normal
426 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
427 const std::string sSymName
, SubArguments
&vSubArguments
);
428 void BinInlineFun(std::set
<std::string
>& decls
,std::set
<std::string
>& funs
430 virtual std::string
BinFuncName(void) const { return "FTest"; }
432 class OpDevSq
: public Normal
435 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
436 const std::string sSymName
, SubArguments
&vSubArguments
);
437 virtual std::string
BinFuncName(void) const { return "DevSq"; }
439 class OpB
: public Normal
442 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
443 const std::string sSymName
, SubArguments
&vSubArguments
);
444 void BinInlineFun(std::set
<std::string
>& decls
,std::set
<std::string
>& funs
446 virtual std::string
BinFuncName(void) const { return "B"; }
448 class OpBetaDist
: public Normal
451 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
452 const std::string sSymName
, SubArguments
&vSubArguments
);
453 void BinInlineFun(std::set
<std::string
>& decls
,std::set
<std::string
>& funs
455 virtual std::string
BinFuncName(void) const { return "BetaDist"; }
457 class OpBetainv
:public Normal
{
459 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
460 const std::string sSymName
, SubArguments
&vSubArguments
);
461 virtual void BinInlineFun(std::set
<std::string
>& ,std::set
<std::string
>&);
462 virtual std::string
BinFuncName(void) const { return "OpBetainv"; }
464 class OpMinA
: public Normal
467 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
468 const std::string sSymName
, SubArguments
&vSubArguments
);
469 virtual std::string
BinFuncName(void) const { return "OpMinA"; }
470 virtual bool takeString() const { return true; }
471 virtual bool takeNumeric() const { return true; }
473 class OpCountA
: public Normal
476 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
477 const std::string sSymName
, SubArguments
&vSubArguments
);
478 virtual std::string
BinFuncName(void) const { return "OpCountA"; }
479 virtual bool takeString() const { return true; }
480 virtual bool takeNumeric() const { return true; }
482 class OpMaxA
: public Normal
485 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
486 const std::string sSymName
, SubArguments
&vSubArguments
);
487 virtual std::string
BinFuncName(void) const { return "OpMaxA"; }
488 virtual bool takeString() const { return true; }
489 virtual bool takeNumeric() const { return true; }
491 class OpVarA
: public Normal
494 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
495 const std::string sSymName
, SubArguments
&vSubArguments
);
496 virtual std::string
BinFuncName(void) const { return "OpVarA"; }
497 virtual bool takeString() const { return true; }
498 virtual bool takeNumeric() const { return true; }
500 class OpVarPA
: public Normal
503 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
504 const std::string sSymName
, SubArguments
&vSubArguments
);
505 virtual std::string
BinFuncName(void) const { return "OpVarPA"; }
506 virtual bool takeString() const { return true; }
507 virtual bool takeNumeric() const { return true; }
509 class OpStDevPA
: public Normal
512 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
513 const std::string sSymName
, SubArguments
&vSubArguments
);
514 virtual std::string
BinFuncName(void) const { return "OpStDevPA"; }
515 virtual bool takeString() const { return true; }
516 virtual bool takeNumeric() const { return true; }
518 class OpAverageA
: public Normal
521 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
522 const std::string sSymName
, SubArguments
&vSubArguments
);
523 virtual std::string
BinFuncName(void) const { return "OpAverageA"; }
524 virtual bool takeString() const { return true; }
525 virtual bool takeNumeric() const { return true; }
527 class OpStDevA
: public Normal
530 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
531 const std::string sSymName
, SubArguments
&vSubArguments
);
532 virtual std::string
BinFuncName(void) const { return "OpStDevA"; }
533 virtual bool takeString() const { return true; }
534 virtual bool takeNumeric() const { return true; }
536 class OpAveDev
: public Normal
539 virtual void GenSlidingWindowFunction(std::stringstream
&ss
,
540 const std::string sSymName
, SubArguments
&vSubArguments
);
541 virtual std::string
BinFuncName(void) const { return "AveDev"; }
548 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */