23 #ifndef __DBSCAN_BATCH_H__
24 #define __DBSCAN_BATCH_H__
26 #include "algorithms/algorithm.h"
27 #include "data_management/data/numeric_table.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/dbscan/dbscan_types.h"
54 template<
typename algorithmFPType, Method method, CpuType cpu>
55 class DAAL_EXPORT BatchContainer :
public daal::algorithms::AnalysisContainerIface<batch>
63 BatchContainer(daal::services::Environment::env *daalEnv);
65 virtual ~BatchContainer();
69 virtual services::Status compute() DAAL_C11_OVERRIDE;
85 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
86 class DAAL_EXPORT Batch :
public daal::algorithms::Analysis<batch>
89 typedef algorithms::dbscan::Input InputType;
90 typedef algorithms::dbscan::Parameter ParameterType;
91 typedef algorithms::dbscan::Result ResultType;
98 Batch(algorithmFPType epsilon,
size_t minObservations);
106 Batch(
const Batch<algorithmFPType, method> &other);
117 ParameterType& parameter() {
return *
static_cast<ParameterType*
>(_par); }
123 const ParameterType& parameter()
const {
return *
static_cast<const ParameterType*
>(_par); }
129 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
135 ResultPtr getResult()
144 services::Status setResult(
const ResultPtr& result)
146 DAAL_CHECK(result, services::ErrorNullResult)
148 _res = _result.get();
149 return services::Status();
157 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
159 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
163 virtual Batch<algorithmFPType, method> * cloneImpl() const DAAL_C11_OVERRIDE
165 return new Batch<algorithmFPType, method>(*this);
168 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
170 _result.reset(
new ResultType());
171 services::Status s = _result->allocate<algorithmFPType>(_in, _par, (int) method);
172 _res = _result.get();
178 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
180 _result.reset(
new ResultType());
191 using interface1::BatchContainer;
192 using interface1::Batch;
daal::algorithms::dbscan::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: dbscan_batch.h:144
daal::algorithms::dbscan::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: dbscan_batch.h:157
daal::algorithms::dbscan::interface1::Batch::parameter
const ParameterType & parameter() const
Definition: dbscan_batch.h:123
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::dbscan::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: dbscan_batch.h:129
daal::algorithms::dbscan::interface1::Batch::getResult
ResultPtr getResult()
Definition: dbscan_batch.h:135
daal::batch
Definition: daal_defines.h:110
daal::algorithms::dbscan::interface1::Batch::input
InputType input
Definition: dbscan_batch.h:184
daal::algorithms::dbscan::interface1::Batch
Computes the results of the DBSCAN algorithm in the batch processing mode.
Definition: dbscan_batch.h:86
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::algorithms::dbscan::interface1::BatchContainer
Provides methods to run implementations of the DBSCAN algorithm. This class is associated with the da...
Definition: dbscan_batch.h:55
daal::services::ErrorNullResult
Definition: error_indexes.h:96
daal::algorithms::dbscan::interface1::Batch::parameter
ParameterType & parameter()
Definition: dbscan_batch.h:117