49 #ifndef __ZSCORE_BATCH_H__ 50 #define __ZSCORE_BATCH_H__ 52 #include "algorithms/algorithm.h" 53 #include "data_management/data/numeric_table.h" 54 #include "services/daal_defines.h" 55 #include "algorithms/normalization/zscore_types.h" 61 namespace normalization
81 template<
typename algorithmFPType, Method method, CpuType cpu>
82 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
90 BatchContainer(daal::services::Environment::env *daalEnv);
92 virtual ~BatchContainer();
98 virtual services::Status compute() DAAL_C11_OVERRIDE;
106 class DAAL_EXPORT BatchImpl :
public daal::algorithms::Analysis<batch>
109 typedef algorithms::normalization::zscore::Input InputType;
110 typedef algorithms::normalization::zscore::Result ResultType;
125 BatchImpl(
const BatchImpl &other) : input(other.input)
134 ResultPtr getResult()
143 virtual BaseParameter* getParameter() = 0;
149 virtual services::Status setResult(
const ResultPtr &result)
151 DAAL_CHECK(result, services::ErrorNullResult)
153 _res = _result.get();
154 return services::Status();
163 services::SharedPtr<BatchImpl> clone()
const 165 return services::SharedPtr<BatchImpl>(cloneImpl());
168 virtual ~BatchImpl() {}
177 _result = ResultPtr(
new ResultType());
180 virtual BatchImpl * cloneImpl()
const DAAL_C11_OVERRIDE = 0;
197 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
198 class DAAL_EXPORT Batch :
public BatchImpl
201 typedef BatchImpl super;
203 typedef typename super::InputType InputType;
204 typedef algorithms::normalization::zscore::Parameter<algorithmFPType, method> ParameterType;
205 typedef typename super::ResultType ResultType;
207 Parameter<algorithmFPType, method> parameter;
220 Batch(
const Batch<algorithmFPType, method> &other) : BatchImpl(other), parameter(other.parameter)
231 virtual BaseParameter* getParameter() DAAL_C11_OVERRIDE {
return ¶meter; }
238 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
245 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const 247 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
251 virtual Batch<algorithmFPType, method> *cloneImpl()
const DAAL_C11_OVERRIDE
253 return new Batch<algorithmFPType, method>(*this);
256 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
258 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, method);
259 _res = _result.get();
265 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
272 using interface2::BatchContainer;
273 using interface2::BatchImpl;
274 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:201
daal::services::interface1::Environment::_envStruct
The environment structure.
Definition: env_detect.h:95
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::normalization::zscore::interface2::BatchImpl::BatchImpl
BatchImpl()
Definition: zscore.h:113
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:79
daal::algorithms::normalization::zscore::interface2::BatchImpl::setResult
virtual services::Status setResult(const ResultPtr &result)
Definition: zscore.h:149
daal::algorithms::normalization::zscore::interface2::Batch::getParameter
virtual BaseParameter * getParameter() DAAL_C11_OVERRIDE
Definition: zscore.h:231
daal::algorithms::normalization::zscore::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: zscore.h:220
daal::batch
Definition: daal_defines.h:132
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::normalization::zscore::interface2::Parameter
Class that specifies the parameters of the algorithm in the batch computing mode. ...
Definition: zscore_types.h:195
daal::services::interface1::SharedPtr::get
T * get() const
Definition: daal_shared_ptr.h:332
daal::algorithms::normalization::zscore::interface2::BatchImpl
Abstract class that specifies interface of the algorithms for computing correlation or variance-covar...
Definition: zscore.h:106
daal::algorithms::normalization::zscore::interface2::BatchImpl::input
InputType input
Definition: zscore.h:170
daal::algorithms::normalization::zscore::interface2::Result
Provides methods to access final results obtained with the compute() method of the z-score normalizat...
Definition: zscore_types.h:247
daal::algorithms::normalization::zscore::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: zscore.h:238
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::algorithms::normalization::zscore::interface2::BatchImpl::getResult
ResultPtr getResult()
Definition: zscore.h:134
daal::algorithms::normalization::zscore::interface2::BatchContainer
Provides methods to run implementations of the z-score normalization algorithm. It is associated with...
Definition: zscore.h:82
daal::algorithms::normalization::zscore::interface2::BatchImpl::clone
services::SharedPtr< BatchImpl > clone() const
Definition: zscore.h:163
daal::algorithms::normalization::zscore::interface2::BatchImpl::BatchImpl
BatchImpl(const BatchImpl &other)
Definition: zscore.h:125
daal::algorithms::normalization::zscore::interface2::Batch::Batch
Batch()
Definition: zscore.h:210
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::normalization::zscore::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: zscore.h:245
daal::algorithms::normalization::zscore::interface2::Batch
Normalizes datasets in the batch processing mode.
Definition: zscore.h:198