23 #ifndef __ZSCORE_BATCH_H__
24 #define __ZSCORE_BATCH_H__
26 #include "algorithms/algorithm.h"
27 #include "data_management/data/numeric_table.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/normalization/zscore_types.h"
35 namespace normalization
55 template<
typename algorithmFPType, Method method, CpuType cpu>
56 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
64 BatchContainer(daal::services::Environment::env *daalEnv);
66 virtual ~BatchContainer();
72 virtual services::Status compute() DAAL_C11_OVERRIDE;
80 class DAAL_EXPORT BatchImpl :
public daal::algorithms::Analysis<batch>
83 typedef algorithms::normalization::zscore::Input InputType;
84 typedef algorithms::normalization::zscore::Result ResultType;
99 BatchImpl(
const BatchImpl &other) : input(other.input)
108 ResultPtr getResult()
117 virtual BaseParameter* getParameter() = 0;
123 virtual services::Status setResult(
const ResultPtr &result)
125 DAAL_CHECK(result, services::ErrorNullResult)
127 _res = _result.get();
128 return services::Status();
137 services::SharedPtr<BatchImpl> clone()
const
139 return services::SharedPtr<BatchImpl>(cloneImpl());
142 virtual ~BatchImpl() {}
151 _result = ResultPtr(
new ResultType());
154 virtual BatchImpl * cloneImpl() const DAAL_C11_OVERRIDE = 0;
171 template<typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
172 class DAAL_EXPORT Batch : public BatchImpl
175 typedef BatchImpl super;
177 typedef typename super::InputType InputType;
178 typedef algorithms::normalization::zscore::Parameter<algorithmFPType, method> ParameterType;
179 typedef typename super::ResultType ResultType;
181 Parameter<algorithmFPType, method> parameter;
194 Batch(
const Batch<algorithmFPType, method> &other) : BatchImpl(other), parameter(other.parameter)
205 virtual BaseParameter* getParameter() DAAL_C11_OVERRIDE {
return ¶meter; }
212 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
219 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
221 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
225 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
227 return new Batch<algorithmFPType, method>(*this);
230 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
232 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, method);
233 _res = _result.get();
239 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
246 using interface2::BatchContainer;
247 using interface2::BatchImpl;
248 using interface2::Batch;
daal::algorithms::normalization::zscore::interface2::BaseParameter
Class that specifies the base parameters of the algorithm in the batch computing mode.
Definition: zscore_types.h:175
daal
Definition: algorithm_base_common.h:31
daal::algorithms::normalization::zscore::interface2::BatchImpl::BatchImpl
BatchImpl()
Definition: zscore.h:87
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:53
daal::algorithms::normalization::zscore::defaultDense
Definition: zscore_types.h:64
daal::algorithms::normalization::zscore::Method
Method
Definition: zscore_types.h:62
daal::algorithms::normalization::zscore::interface2::BatchImpl::setResult
virtual services::Status setResult(const ResultPtr &result)
Definition: zscore.h:123
daal::algorithms::normalization::zscore::interface2::Batch::getParameter
virtual BaseParameter * getParameter() DAAL_C11_OVERRIDE
Definition: zscore.h:205
daal::algorithms::normalization::zscore::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: zscore.h:194
daal::batch
Definition: daal_defines.h:106
daal::algorithms::normalization::zscore::interface2::Parameter
Class that specifies the parameters of the algorithm in the batch computing mode. ...
Definition: zscore_types.h:169
daal::algorithms::normalization::zscore::interface2::BatchImpl::clone
services::SharedPtr< BatchImpl > clone() const
Definition: zscore.h:137
daal::algorithms::normalization::zscore::interface2::BatchImpl
Abstract class that specifies interface of the algorithms for computing correlation or variance-covar...
Definition: zscore.h:80
daal::algorithms::normalization::zscore::interface2::BatchImpl::input
InputType input
Definition: zscore.h:144
daal::algorithms::normalization::zscore::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: zscore.h:219
daal::algorithms::normalization::zscore::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: zscore.h:212
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::algorithms::normalization::zscore::interface2::BatchImpl::getResult
ResultPtr getResult()
Definition: zscore.h:108
daal::algorithms::normalization::zscore::interface2::BatchContainer
Provides methods to run implementations of the z-score normalization algorithm. It is associated with...
Definition: zscore.h:56
daal::algorithms::normalization::zscore::interface2::BatchImpl::BatchImpl
BatchImpl(const BatchImpl &other)
Definition: zscore.h:99
daal::algorithms::normalization::zscore::interface2::Batch::Batch
Batch()
Definition: zscore.h:184
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::normalization::zscore::interface2::Batch
Normalizes datasets in the batch processing mode.
Definition: zscore.h:172