49 #ifndef __LOW_ORDER_MOMENTS_ONLINE_H__
50 #define __LOW_ORDER_MOMENTS_ONLINE_H__
52 #include "algorithms/algorithm.h"
53 #include "services/daal_defines.h"
54 #include "algorithms/moments/low_order_moments_types.h"
60 namespace low_order_moments
79 template<
typename algorithmFPType, Method method, CpuType cpu>
80 class DAAL_EXPORT OnlineContainer :
public daal::algorithms::AnalysisContainerIface<online>
88 OnlineContainer(daal::services::Environment::env *daalEnv);
90 virtual ~OnlineContainer();
95 virtual services::Status compute() DAAL_C11_OVERRIDE;
100 virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE;
117 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
118 class DAAL_EXPORT Online :
public daal::algorithms::Analysis<online>
136 Online(
const Online<algorithmFPType, method> &other) : parameter(other.parameter), input(other.input)
145 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
151 ResultPtr getResult()
160 services::Status setResult(
const ResultPtr &result)
162 DAAL_CHECK(result, services::ErrorNullResult)
164 _res = _result.get();
165 return services::Status();
172 PartialResultPtr getPartialResult()
174 return _partialResult;
182 services::Status setPartialResult(
const PartialResultPtr &partialResult,
bool initFlag =
false)
184 _partialResult = partialResult;
185 _pres = _partialResult.get();
186 setInitFlag(initFlag);
187 return services::Status();
195 services::SharedPtr<Online<algorithmFPType, method> > clone()
const
197 return services::SharedPtr<Online<algorithmFPType, method> >(cloneImpl());
201 virtual Online<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
203 return new Online<algorithmFPType, method>(*this);
206 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
208 services::Status s = _result->allocate<algorithmFPType>(_in, 0, 0);
209 _res = _result.get();
210 _pres = _partialResult.get();
214 virtual services::Status allocatePartialResult() DAAL_C11_OVERRIDE
216 services::Status s = _partialResult->allocate<algorithmFPType>(_in, 0, 0);
217 _pres = _partialResult.get();
221 virtual services::Status initializePartialResult() DAAL_C11_OVERRIDE
223 services::Status s = _partialResult->initialize<algorithmFPType>(_in, 0, 0);
224 _pres = _partialResult.get();
230 Analysis<online>::_ac =
new __DAAL_ALGORITHM_CONTAINER(online, OnlineContainer, algorithmFPType, method)(&_env);
233 _result.reset(
new Result());
234 _partialResult.reset(
new PartialResult());
238 PartialResultPtr _partialResult;
243 using interface1::OnlineContainer;
244 using interface1::Online;
daal
Definition: algorithm_base_common.h:57
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:79
daal::algorithms::low_order_moments::interface1::Online::clone
services::SharedPtr< Online< algorithmFPType, method > > clone() const
Definition: low_order_moments_online.h:195
daal::algorithms::low_order_moments::interface1::Online::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: low_order_moments_online.h:145
daal::algorithms::low_order_moments::interface1::Online::setPartialResult
services::Status setPartialResult(const PartialResultPtr &partialResult, bool initFlag=false)
Definition: low_order_moments_online.h:182
daal::algorithms::low_order_moments::interface1::Online::setResult
services::Status setResult(const ResultPtr &result)
Definition: low_order_moments_online.h:160
daal::algorithms::low_order_moments::interface1::Online
Computes moments of low order in the online processing mode.
Definition: low_order_moments_online.h:118
daal::algorithms::low_order_moments::interface1::OnlineContainer
Provides methods to run implementations of the low order moments algorithm. This class is associated ...
Definition: low_order_moments_online.h:80
daal::algorithms::low_order_moments::interface1::Online::getPartialResult
PartialResultPtr getPartialResult()
Definition: low_order_moments_online.h:172
daal::algorithms::low_order_moments::interface1::Online::getResult
ResultPtr getResult()
Definition: low_order_moments_online.h:151
daal::algorithms::low_order_moments::interface1::Online::Online
Online(const Online< algorithmFPType, method > &other)
Definition: low_order_moments_online.h:136
daal::algorithms::low_order_moments::interface1::Parameter
Low order moments algorithm parameters.
Definition: low_order_moments_types.h:293
daal::algorithms::low_order_moments::interface1::Online::parameter
Parameter parameter
Definition: low_order_moments_online.h:122
daal::algorithms::low_order_moments::interface1::Online::Online
Online()
Definition: low_order_moments_online.h:125
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::online
Definition: daal_defines.h:133
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::low_order_moments::interface1::Online::input
Input input
Definition: low_order_moments_online.h:121