22 #ifndef __PCA_BATCH_H__
23 #define __PCA_BATCH_H__
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "services/daal_defines.h"
28 #include "services/daal_memory.h"
29 #include "algorithms/pca/pca_types.h"
48 template<
typename algorithmFPType, Method method, CpuType cpu>
49 class DAAL_EXPORT BatchContainer :
public AnalysisContainerIface<batch>
55 template<
typename algorithmFPType, CpuType cpu>
56 class DAAL_EXPORT BatchContainer<algorithmFPType, correlationDense, cpu> :
public AnalysisContainerIface<batch>
64 BatchContainer(daal::services::Environment::env *daalEnv);
70 services::Status compute() DAAL_C11_OVERRIDE;
76 template<
typename algorithmFPType, CpuType cpu>
77 class DAAL_EXPORT BatchContainer<algorithmFPType, svdDense, cpu> :
public AnalysisContainerIface<batch>
85 BatchContainer(daal::services::Environment::env *daalEnv);
91 services::Status compute() DAAL_C11_OVERRIDE;
105 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = correlationDense>
106 class DAAL_EXPORT Batch :
public Analysis<batch>
109 typedef algorithms::pca::Input InputType;
110 typedef algorithms::pca::BatchParameter<algorithmFPType, method> ParameterType;
111 typedef algorithms::pca::Result ResultType;
124 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
135 virtual int getMethod() const DAAL_C11_OVERRIDE {
return method; };
141 services::Status setResult(
const ResultPtr& res)
143 DAAL_CHECK(res, services::ErrorNullResult)
145 _res = _result.get();
146 return services::Status();
153 ResultPtr getResult() {
return _result; }
160 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
162 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
166 BatchParameter<algorithmFPType, method> parameter;
171 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
173 return new Batch<algorithmFPType, method>(*this);
176 services::Status allocateResult() DAAL_C11_OVERRIDE
178 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, method);
179 _res = _result.get();
185 _ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
188 _result.reset(
new ResultType());
193 using interface2::BatchContainer;
194 using interface2::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::pca::interface2::Batch::getResult
ResultPtr getResult()
Definition: pca_batch.h:153
daal::batch
Definition: daal_defines.h:106
daal::algorithms::pca::interface2::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: pca_batch.h:124
daal::algorithms::pca::interface2::BatchContainer
Class containing methods to compute the results of the PCA algorithm.
Definition: pca_batch.h:49
daal::algorithms::pca::svdDense
Definition: pca_types.h:57
daal::algorithms::pca::interface2::Batch::input
InputType input
Definition: pca_batch.h:165
daal::algorithms::pca::interface2::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: pca_batch.h:160
daal::algorithms::pca::interface2::Batch::setResult
services::Status setResult(const ResultPtr &res)
Definition: pca_batch.h:141
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::algorithms::pca::interface2::Batch::Batch
Batch()
Definition: pca_batch.h:114
daal::algorithms::pca::interface2::Batch
Computes the results of the PCA algorithm.
Definition: pca_batch.h:106
daal::algorithms::pca::interface2::Batch::parameter
BatchParameter< algorithmFPType, method > parameter
Definition: pca_batch.h:166
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::pca::interface2::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: pca_batch.h:135
daal::algorithms::pca::interface2::BatchParameter
Class that specifies the parameters of the PCA algorithm in the batch computing mode.
Definition: pca_types.h:673
daal::algorithms::pca::correlationDense
Definition: pca_types.h:55