25 #ifndef __ZSCORE_BATCH_H__
26 #define __ZSCORE_BATCH_H__
28 #include "algorithms/algorithm.h"
29 #include "data_management/data/numeric_table.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/normalization/zscore_types.h"
37 namespace normalization
57 template<
typename algorithmFPType, Method method, CpuType cpu>
58 class BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
66 BatchContainer(daal::services::Environment::env *daalEnv);
68 virtual ~BatchContainer();
74 virtual services::Status compute() DAAL_C11_OVERRIDE;
82 class DAAL_EXPORT BatchImpl :
public daal::algorithms::Analysis<batch>
85 typedef algorithms::normalization::zscore::Input InputType;
86 typedef algorithms::normalization::zscore::Result ResultType;
101 BatchImpl(
const BatchImpl &other) : input(other.input)
110 ResultPtr getResult()
120 DAAL_DEPRECATED_VIRTUAL
virtual BaseParameter* getParameter() = 0;
126 virtual BaseParameter& parameter() = 0;
132 virtual const BaseParameter& parameter()
const = 0;
138 virtual services::Status setResult(
const ResultPtr &result)
140 DAAL_CHECK(result, services::ErrorNullResult)
142 _res = _result.get();
143 return services::Status();
152 services::SharedPtr<BatchImpl> clone()
const
154 return services::SharedPtr<BatchImpl>(cloneImpl());
157 virtual ~BatchImpl() {}
166 _result = ResultPtr(
new ResultType());
169 virtual BatchImpl * cloneImpl() const DAAL_C11_OVERRIDE = 0;
186 template<typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
187 class DAAL_EXPORT Batch : public BatchImpl
190 typedef BatchImpl super;
192 typedef typename super::InputType InputType;
193 typedef algorithms::normalization::zscore::Parameter<algorithmFPType, method> ParameterType;
194 typedef typename super::ResultType ResultType;
205 Batch(
const Batch<algorithmFPType, method> &other);
208 virtual ~Batch() DAAL_C11_OVERRIDE
217 virtual ParameterType& parameter() DAAL_C11_OVERRIDE {
return *
static_cast<ParameterType*
>(_par); }
223 virtual const ParameterType& parameter() const DAAL_C11_OVERRIDE {
return *
static_cast<const ParameterType*
>(_par); }
230 DAAL_DEPRECATED_VIRTUAL
virtual BaseParameter* getParameter() DAAL_C11_OVERRIDE {
return &(this->Batch::parameter()); }
236 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
243 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
245 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
249 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
251 return new Batch<algorithmFPType, method>(*this);
254 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
256 services::Status s = _result->allocate<algorithmFPType>(&input, &(this->Batch::parameter()), method);
257 _res = _result.get();
263 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
270 using interface3::BatchContainer;
271 using interface3::BatchImpl;
272 using interface3::Batch;
daal::algorithms::normalization::zscore::interface3::Batch
Normalizes datasets in the batch processing mode.
Definition: zscore.h:187
daal::algorithms::normalization::zscore::interface3::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::batch
Definition: daal_defines.h:112
daal::algorithms::normalization::zscore::interface3::BaseParameter
Class that specifies the base parameters of the algorithm in the batch computing mode.
Definition: zscore_types.h:260
daal::algorithms::normalization::zscore::interface3::BatchImpl::getResult
ResultPtr getResult()
Definition: zscore.h:110
daal::algorithms::normalization::zscore::interface3::BatchImpl::BatchImpl
BatchImpl(const BatchImpl &other)
Definition: zscore.h:101
daal::algorithms::normalization::zscore::interface3::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: zscore.h:243
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:55
daal::algorithms::normalization::zscore::interface3::BatchImpl::input
InputType input
Definition: zscore.h:159
daal::algorithms::normalization::zscore::defaultDense
Definition: zscore_types.h:66
daal::algorithms::normalization::zscore::Method
Method
Definition: zscore_types.h:64
daal::algorithms::normalization::zscore::interface3::BatchImpl
Abstract class that specifies interface of the algorithms for computing correlation or variance-covar...
Definition: zscore.h:82
daal::algorithms::normalization::zscore::interface3::Batch::parameter
virtual ParameterType & parameter() DAAL_C11_OVERRIDE
Definition: zscore.h:217
daal::algorithms::normalization::zscore::interface3::Batch::getParameter
virtual DAAL_DEPRECATED_VIRTUAL BaseParameter * getParameter() DAAL_C11_OVERRIDE
Definition: zscore.h:230
daal::algorithms::normalization::zscore::interface3::BatchContainer::compute
virtual services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::normalization::zscore::interface3::BatchImpl::setResult
virtual services::Status setResult(const ResultPtr &result)
Definition: zscore.h:138
daal::algorithms::normalization::zscore::interface3::Batch::parameter
virtual const ParameterType & parameter() const DAAL_C11_OVERRIDE
Definition: zscore.h:223
daal::algorithms::normalization::zscore::interface3::BatchImpl::clone
services::SharedPtr< BatchImpl > clone() const
Definition: zscore.h:152
daal::algorithms::normalization::zscore::interface3::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: zscore.h:236
daal::algorithms::normalization::zscore::interface3::BatchContainer
Provides methods to run implementations of the z-score normalization algorithm. It is associated with...
Definition: zscore.h:58
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:70
daal::algorithms::normalization::zscore::interface3::BatchContainer::~BatchContainer
virtual ~BatchContainer()
daal::algorithms::normalization::zscore::interface3::Batch::~Batch
virtual ~Batch() DAAL_C11_OVERRIDE
Definition: zscore.h:208
daal::algorithms::normalization::zscore::interface3::BatchImpl::BatchImpl
BatchImpl()
Definition: zscore.h:89