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()
118 DAAL_DEPRECATED_VIRTUAL
virtual BaseParameter* getParameter() = 0;
124 virtual BaseParameter& parameter() = 0;
130 virtual const BaseParameter& parameter()
const = 0;
136 virtual services::Status setResult(
const ResultPtr &result)
138 DAAL_CHECK(result, services::ErrorNullResult)
140 _res = _result.get();
141 return services::Status();
150 services::SharedPtr<BatchImpl> clone()
const
152 return services::SharedPtr<BatchImpl>(cloneImpl());
155 virtual ~BatchImpl() {}
164 _result = ResultPtr(
new ResultType());
167 virtual BatchImpl * cloneImpl() const DAAL_C11_OVERRIDE = 0;
184 template<typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
185 class DAAL_EXPORT Batch : public BatchImpl
188 typedef BatchImpl super;
190 typedef typename super::InputType InputType;
191 typedef algorithms::normalization::zscore::Parameter<algorithmFPType, method> ParameterType;
192 typedef typename super::ResultType ResultType;
203 Batch(
const Batch<algorithmFPType, method> &other);
206 virtual ~Batch() DAAL_C11_OVERRIDE
215 virtual ParameterType& parameter() DAAL_C11_OVERRIDE {
return *
static_cast<ParameterType*
>(_par); }
221 virtual const ParameterType& parameter() const DAAL_C11_OVERRIDE {
return *
static_cast<const ParameterType*
>(_par); }
228 DAAL_DEPRECATED_VIRTUAL
virtual BaseParameter* getParameter() DAAL_C11_OVERRIDE {
return &(this->Batch::parameter()); }
234 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
241 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
243 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
247 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
249 return new Batch<algorithmFPType, method>(*this);
252 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
254 services::Status s = _result->allocate<algorithmFPType>(&input, &(this->Batch::parameter()), method);
255 _res = _result.get();
261 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
268 using interface3::BatchContainer;
269 using interface3::BatchImpl;
270 using interface3::Batch;
daal
Definition: algorithm_base_common.h:31
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::interface3::BatchImpl::getResult
ResultPtr getResult()
Definition: zscore.h:108
daal::algorithms::normalization::zscore::Method
Method
Definition: zscore_types.h:62
daal::algorithms::normalization::zscore::interface3::Batch::parameter
virtual ParameterType & parameter() DAAL_C11_OVERRIDE
Definition: zscore.h:215
daal::algorithms::normalization::zscore::interface3::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: zscore.h:241
daal::algorithms::normalization::zscore::interface3::Batch::getParameter
virtual DAAL_DEPRECATED_VIRTUAL BaseParameter * getParameter() DAAL_C11_OVERRIDE
Definition: zscore.h:228
daal::algorithms::normalization::zscore::interface3::Batch::~Batch
virtual ~Batch() DAAL_C11_OVERRIDE
Definition: zscore.h:206
daal::batch
Definition: daal_defines.h:110
daal::algorithms::normalization::zscore::interface3::BatchImpl::clone
services::SharedPtr< BatchImpl > clone() const
Definition: zscore.h:150
daal::algorithms::normalization::zscore::interface3::BatchImpl::BatchImpl
BatchImpl()
Definition: zscore.h:87
daal::algorithms::normalization::zscore::interface3::BatchContainer
Provides methods to run implementations of the z-score normalization algorithm. It is associated with...
Definition: zscore.h:56
daal::algorithms::normalization::zscore::interface3::BatchImpl
Abstract class that specifies interface of the algorithms for computing correlation or variance-covar...
Definition: zscore.h:80
daal::algorithms::normalization::zscore::interface3::BatchImpl::BatchImpl
BatchImpl(const BatchImpl &other)
Definition: zscore.h:99
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::interface3::BatchImpl::input
InputType input
Definition: zscore.h:157
daal::algorithms::normalization::zscore::interface3::BaseParameter
Class that specifies the base parameters of the algorithm in the batch computing mode.
Definition: zscore_types.h:258
daal::algorithms::normalization::zscore::interface3::BatchImpl::setResult
virtual services::Status setResult(const ResultPtr &result)
Definition: zscore.h:136
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::normalization::zscore::interface3::Batch
Normalizes datasets in the batch processing mode.
Definition: zscore.h:185
daal::algorithms::normalization::zscore::interface3::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: zscore.h:234
daal::algorithms::normalization::zscore::interface3::Batch::parameter
virtual const ParameterType & parameter() const DAAL_C11_OVERRIDE
Definition: zscore.h:221