49 #ifndef __PCA_TRANSFORM_BATCH_H__ 50 #define __PCA_TRANSFORM_BATCH_H__ 52 #include "algorithms/algorithm.h" 53 #include "services/daal_defines.h" 54 #include "algorithms/pca/transform/pca_transform_types.h" 79 template<
typename algorithmFPType, Method method, CpuType cpu>
80 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
88 BatchContainer(daal::services::Environment::env *daalEnv);
90 virtual ~BatchContainer();
94 virtual services::Status compute() DAAL_C11_OVERRIDE;
108 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
109 class DAAL_EXPORT Batch :
public daal::algorithms::Analysis<batch>
112 typedef algorithms::pca::transform::Input InputType;
113 typedef algorithms::pca::transform::Parameter ParameterType;
114 typedef algorithms::pca::transform::Result ResultType;
117 ParameterType parameter;
123 Batch(
size_t nComponents = 0): parameter(nComponents)
134 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
143 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
149 ResultPtr getResult()
158 services::Status setResult(
const ResultPtr& res)
160 DAAL_CHECK(res, services::ErrorNullResult)
162 _res = _result.get();
163 return services::Status();
171 services::SharedPtr<daal::algorithms::pca::transform::interface1::Batch<algorithmFPType, method> > clone()
const 173 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
177 virtual Batch<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
179 return new Batch<algorithmFPType, method>(*this);
182 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
184 _result.reset(
new ResultType());
185 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, 0);
186 _res = _result.get();
192 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
202 using interface1::BatchContainer;
203 using interface1::Batch;
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::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:79
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::services::interface1::SharedPtr::get
T * get() const
Definition: daal_shared_ptr.h:332
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::services::ErrorNullResult
Definition: error_indexes.h:122