27 #include "algorithms/distributions/distribution.h"
28 #include "algorithms/distributions/uniform/uniform_types.h"
34 namespace distributions
55 template<
typename algorithmFPType, Method method, CpuType cpu>
56 class BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
64 BatchContainer(daal::services::Environment::env *daalEnv);
71 services::Status compute() DAAL_C11_OVERRIDE;
88 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
89 class DAAL_EXPORT Batch :
public distributions::BatchBase
92 typedef distributions::BatchBase super;
94 typedef typename super::InputType InputType;
95 typedef algorithms::distributions::uniform::Parameter<algorithmFPType> ParameterType;
96 typedef typename super::ResultType ResultType;
103 Batch(algorithmFPType a = 0.0, algorithmFPType b = 1.0) : parameter(a, b)
112 Batch(
const Batch<algorithmFPType, method> &other): super(other), parameter(other.parameter)
121 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
127 ResultPtr getResult() {
return _result; }
135 services::Status setResult(
const ResultPtr& result)
137 DAAL_CHECK(result, services::ErrorNullResult)
139 _res = _result.get();
140 return services::Status();
148 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
150 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
158 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
161 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), ¶meter, (
int) method);
162 this->_res = this->_result.get();
166 Parameter<algorithmFPType> parameter;
169 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
171 return new Batch<algorithmFPType, method>(*this);
176 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
179 _result.reset(
new ResultType());
187 using interface1::BatchContainer;
188 using interface1::Batch;
daal::algorithms::distributions::uniform::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: uniform.h:135
daal::algorithms::distributions::uniform::interface1::BatchContainer
Provides methods to run implementations of the uniform distribution. This class is associated with th...
Definition: uniform.h:56
daal::algorithms::distributions::uniform::interface1::Parameter
Uniform distribution parameters.
Definition: uniform_types.h:66
daal::batch
Definition: daal_defines.h:112
daal::algorithms::distributions::uniform::interface1::Batch::parameter
Parameter< algorithmFPType > parameter
Definition: uniform.h:166
daal::algorithms::distributions::uniform::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: uniform.h:112
daal::algorithms::distributions::uniform::interface1::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::distributions::uniform::interface1::Batch::allocateResult
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: uniform.h:158
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::AnalysisContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the analy...
Definition: analysis.h:55
daal::algorithms::distributions::uniform::interface1::Batch::getResult
ResultPtr getResult()
Definition: uniform.h:127
daal::algorithms::distributions::uniform::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: uniform.h:148
daal::algorithms::distributions::uniform::interface1::Batch::Batch
Batch(algorithmFPType a=0.0, algorithmFPType b=1.0)
Definition: uniform.h:103
daal::algorithms::distributions::uniform::interface1::Batch
Provides methods for uniform distribution computations in the batch processing mode.
Definition: uniform.h:89
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:70
daal::algorithms::distributions::uniform::interface1::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::distributions::uniform::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: uniform.h:121