22 #ifndef __QUANTILES_BATCH_H__
23 #define __QUANTILES_BATCH_H__
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "services/daal_defines.h"
28 #include "algorithms/quantiles/quantiles_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);
64 virtual ~BatchContainer();
68 virtual services::Status compute() DAAL_C11_OVERRIDE;
84 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
85 class DAAL_EXPORT Batch :
public daal::algorithms::Analysis<batch>
88 typedef algorithms::quantiles::Input InputType;
89 typedef algorithms::quantiles::Parameter ParameterType;
90 typedef algorithms::quantiles::Result ResultType;
93 ParameterType parameter;
107 Batch(
const Batch<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
118 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
124 ResultPtr getResult()
133 services::Status setResult(
const ResultPtr &result)
135 DAAL_CHECK(result, services::ErrorNullResult)
136 if(!result)
return services::Status(services::ErrorNullResult);
138 _res = _result.get();
139 return services::Status();
147 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
149 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
153 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
155 return new Batch<algorithmFPType, method>(*this);
158 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
160 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, method);
161 _res = _result.get();
167 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
170 _result.reset(
new ResultType());
177 using interface1::BatchContainer;
178 using interface1::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::quantiles::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: quantiles_batch.h:133
daal::algorithms::quantiles::interface1::Batch::input
InputType input
Definition: quantiles_batch.h:92
daal::algorithms::quantiles::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: quantiles_batch.h:147
daal::algorithms::quantiles::interface1::Batch::parameter
ParameterType parameter
Definition: quantiles_batch.h:93
daal::batch
Definition: daal_defines.h:106
daal::algorithms::quantiles::interface1::Batch
Computes values of quantiles in the batch processing mode.
Definition: quantiles_batch.h:85
daal::algorithms::quantiles::interface1::BatchContainer
Provides methods to run implementations of the quantiles algorithm. It is associated with the daal::a...
Definition: quantiles_batch.h:54
daal::algorithms::quantiles::interface1::Batch::getResult
ResultPtr getResult()
Definition: quantiles_batch.h:124
daal::algorithms::quantiles::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: quantiles_batch.h:107
daal::algorithms::quantiles::interface1::Batch::Batch
Batch()
Definition: quantiles_batch.h:96
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::quantiles::quantiles
Definition: quantiles_types.h:67
daal::algorithms::quantiles::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: quantiles_batch.h:118