22 #ifndef __EM_GMM_INIT_BATCH_H__
23 #define __EM_GMM_INIT_BATCH_H__
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "services/daal_defines.h"
28 #include "em_gmm_init_types.h"
53 template<
typename algorithmFPType, Method method, CpuType cpu>
54 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
62 BatchContainer(daal::services::Environment::env *daalEnv);
67 virtual services::Status compute() DAAL_C11_OVERRIDE;
79 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
80 class DAAL_EXPORT Batch :
public daal::algorithms::Analysis<batch>
83 typedef algorithms::em_gmm::init::Input InputType;
84 typedef algorithms::em_gmm::init::Parameter ParameterType;
85 typedef algorithms::em_gmm::init::Result ResultType;
87 Batch(
const size_t nComponents) : parameter(nComponents)
98 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
107 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)0; }
113 services::Status setResult(
const ResultPtr& result)
115 DAAL_CHECK(result, services::ErrorNullResult)
117 _res = _result.get();
118 return services::Status();
125 ResultPtr getResult()
135 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
137 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
141 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
143 return new Batch<algorithmFPType, method>(*this);
146 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
148 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, 0);
149 _res = _result.get();
155 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
158 _result.reset(
new ResultType());
163 ParameterType parameter;
170 using interface1::BatchContainer;
171 using interface1::Batch;
daal::algorithms::em_gmm::init::interface1::Batch::getResult
ResultPtr getResult()
Definition: em_gmm_init_batch.h:125
daal::algorithms::em_gmm::init::interface1::Batch::parameter
ParameterType parameter
Definition: em_gmm_init_batch.h:163
daal::algorithms::em_gmm::init::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: em_gmm_init_batch.h:107
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::em_gmm::init::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: em_gmm_init_batch.h:98
daal::algorithms::em_gmm::init::interface1::Batch
Computes initial values for the EM for GMM algorithm in the batch processing mode.
Definition: em_gmm_init_batch.h:80
daal::batch
Definition: daal_defines.h:110
daal::algorithms::em_gmm::init::interface1::BatchContainer
Provides methods to compute initial values for the EM for GMM algorithm. The class is associated with...
Definition: em_gmm_init_batch.h:54
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::algorithms::em_gmm::init::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: em_gmm_init_batch.h:113
daal::algorithms::em_gmm::init::interface1::Batch::input
InputType input
Definition: em_gmm_init_batch.h:162
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::em_gmm::init::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: em_gmm_init_batch.h:135