49 #ifndef __LOW_ORDER_MOMENTS_BATCH_H__
50 #define __LOW_ORDER_MOMENTS_BATCH_H__
52 #include "algorithms/algorithm.h"
53 #include "data_management/data/numeric_table.h"
54 #include "services/daal_defines.h"
55 #include "algorithms/moments/low_order_moments_types.h"
61 namespace low_order_moments
75 class BatchContainerIface :
public daal::algorithms::AnalysisContainerIface<batch>
78 BatchContainerIface() {};
79 virtual ~BatchContainerIface() {}
84 virtual services::Status compute() = 0;
95 template<
typename algorithmFPType, Method method, CpuType cpu>
96 class DAAL_EXPORT BatchContainer :
public BatchContainerIface
104 BatchContainer(daal::services::Environment::env *daalEnv);
106 virtual ~BatchContainer();
110 virtual services::Status compute() DAAL_C11_OVERRIDE;
118 class DAAL_EXPORT BatchImpl :
public daal::algorithms::Analysis<batch>
133 BatchImpl(
const BatchImpl &other) : parameter(other.parameter), input(other.input)
142 ResultPtr getResult()
151 virtual services::Status setResult(
const ResultPtr &result)
153 DAAL_CHECK(result, services::ErrorNullResult)
155 _res = _result.get();
156 return services::Status();
164 services::SharedPtr<BatchImpl> clone()
const
166 return services::SharedPtr<BatchImpl>(cloneImpl());
169 virtual ~BatchImpl() {}
179 _result.reset(
new Result());
183 virtual BatchImpl *cloneImpl() const DAAL_C11_OVERRIDE = 0;
203 template<typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
204 class DAAL_EXPORT Batch : public BatchImpl
219 Batch(
const Batch<algorithmFPType, method> &other) : BatchImpl(other)
230 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
237 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
239 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
243 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
245 return new Batch<algorithmFPType, method>(*this);
248 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
250 services::Status s = _result->allocate<algorithmFPType>(&input, 0, 0);
251 _res = _result.get();
257 this->_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
262 using interface1::BatchContainerIface;
263 using interface1::BatchContainer;
264 using interface1::BatchImpl;
265 using interface1::Batch;
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::BatchImpl::clone
services::SharedPtr< BatchImpl > clone() const
Definition: low_order_moments_batch.h:164
daal::algorithms::low_order_moments::defaultDense
Definition: low_order_moments_types.h:74
daal::algorithms::low_order_moments::interface1::BatchContainerIface::compute
virtual services::Status compute()=0
daal::algorithms::low_order_moments::interface1::Batch::Batch
Batch()
Definition: low_order_moments_batch.h:208
daal::algorithms::low_order_moments::interface1::BatchImpl::BatchImpl
BatchImpl()
Definition: low_order_moments_batch.h:122
daal::algorithms::low_order_moments::interface1::BatchContainerIface
Class that specifies interfaces of implementations of the low order moments algorithm.
Definition: low_order_moments_batch.h:75
daal::algorithms::low_order_moments::interface1::Result
Provides methods to access final results obtained with the compute() method of the low order moments ...
Definition: low_order_moments_types.h:308
daal::algorithms::low_order_moments::interface1::BatchImpl::input
Input input
Definition: low_order_moments_batch.h:171
daal::algorithms::low_order_moments::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: low_order_moments_batch.h:219
daal::algorithms::low_order_moments::interface1::BatchImpl
Abstract class that specifies interface of the algorithms for computing moments of low order in the b...
Definition: low_order_moments_batch.h:118
daal::algorithms::low_order_moments::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: low_order_moments_batch.h:230
daal::batch
Definition: daal_defines.h:131
daal::algorithms::low_order_moments::interface1::BatchImpl::getResult
ResultPtr getResult()
Definition: low_order_moments_batch.h:142
daal::algorithms::low_order_moments::interface1::Parameter
Low order moments algorithm parameters.
Definition: low_order_moments_types.h:293
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::algorithms::low_order_moments::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: low_order_moments_batch.h:237
daal::algorithms::low_order_moments::interface1::Batch
Computes moments of low order in the batch processing mode.
Definition: low_order_moments_batch.h:204
daal::algorithms::low_order_moments::interface1::BatchImpl::parameter
Parameter parameter
Definition: low_order_moments_batch.h:172
daal::algorithms::low_order_moments::interface1::BatchImpl::setResult
virtual services::Status setResult(const ResultPtr &result)
Definition: low_order_moments_batch.h:151
daal::algorithms::low_order_moments::interface1::BatchImpl::BatchImpl
BatchImpl(const BatchImpl &other)
Definition: low_order_moments_batch.h:133
daal::algorithms::low_order_moments::Method
Method
Definition: low_order_moments_types.h:72
daal::algorithms::low_order_moments::interface1::BatchContainer
Provides methods to run implementations of the low order moments algorithm. This class is associated ...
Definition: low_order_moments_batch.h:96
daal::services::ErrorNullResult
Definition: error_indexes.h:122