49 #ifndef __QR_STREAM_H__ 50 #define __QR_STREAM_H__ 52 #include "algorithms/algorithm.h" 53 #include "data_management/data/numeric_table.h" 54 #include "services/daal_defines.h" 55 #include "algorithms/qr/qr_types.h" 79 template<
typename algorithmFPType, Method method, CpuType cpu>
80 class OnlineContainer :
public daal::algorithms::AnalysisContainerIface<online>
88 OnlineContainer(daal::services::Environment::env *daalEnv);
90 virtual ~OnlineContainer();
94 virtual services::Status compute() DAAL_C11_OVERRIDE;
98 virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE;
112 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
113 class Online :
public daal::algorithms::Analysis<online>
116 typedef OnlinePartialResult PartialResult;
117 typedef OnlinePartialResultPtr PartialResultPtr;
119 typedef algorithms::qr::Input InputType;
120 typedef algorithms::qr::Parameter ParameterType;
121 typedef algorithms::qr::Result ResultType;
122 typedef algorithms::qr::OnlinePartialResult PartialResultType;
125 ParameterType parameter;
138 Online(
const Online<algorithmFPType, method> &other) : input(other.input), parameter(other.parameter)
147 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int)method; }
153 ResultPtr getResult()
162 PartialResultPtr getPartialResult()
164 return _partialResult;
171 services::Status setResult(
const ResultPtr& res)
173 DAAL_CHECK(res, services::ErrorNullResult)
175 _res = _result.get();
176 return services::Status();
185 services::Status setPartialResult(
const PartialResultPtr &partialResult,
bool initFlag =
false)
187 _partialResult = partialResult;
188 _pres = _partialResult.get();
189 setInitFlag(initFlag);
190 return services::Status();
198 services::SharedPtr<Online<algorithmFPType, method> > clone()
const 200 return services::SharedPtr<Online<algorithmFPType, method> >(cloneImpl());
204 virtual Online<algorithmFPType, method> * cloneImpl()
const DAAL_C11_OVERRIDE
206 return new Online<algorithmFPType, method>(*this);
209 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
211 _result.reset(
new ResultType());
212 services::Status s = _result->allocate<algorithmFPType>(_pres, 0, 0);
213 _res = _result.get();
217 virtual services::Status allocatePartialResult() DAAL_C11_OVERRIDE
219 _partialResult.reset(
new PartialResultType());
220 services::Status s = _partialResult->allocate<algorithmFPType>(_in, 0, 0);
221 _pres = _partialResult.get();
225 virtual services::Status initializePartialResult() DAAL_C11_OVERRIDE
227 services::Status s = _partialResult->initialize<algorithmFPType>(_in, 0, 0);
228 _pres = _partialResult.get();
234 Analysis<online>::_ac =
new __DAAL_ALGORITHM_CONTAINER(online, OnlineContainer, algorithmFPType, method)(&_env);
240 PartialResultPtr _partialResult;
245 using interface1::OnlineContainer;
246 using interface1::Online;
daal::algorithms::qr::interface1::Online::input
InputType input
Definition: qr_online.h:124
daal::algorithms::qr::interface1::OnlinePartialResult
Provides methods to access partial results obtained with the compute() method of the QR decomposition...
Definition: qr_types.h:321
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::algorithms::qr::interface1::OnlineContainer::finalizeCompute
virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE
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::algorithms::qr::interface1::Parameter
Parameters for the QR decomposition compute method.
Definition: qr_types.h:662
daal::algorithms::qr::interface1::Result
Provides methods to access final results obtained with the compute() method of the QR decomposition a...
Definition: qr_types.h:418
daal::algorithms::qr::interface1::Online::setResult
services::Status setResult(const ResultPtr &res)
Definition: qr_online.h:171
daal::algorithms::qr::interface1::Online::parameter
ParameterType parameter
Definition: qr_online.h:125
daal::algorithms::qr::interface1::OnlineContainer::~OnlineContainer
virtual ~OnlineContainer()
daal::algorithms::qr::interface1::Online::clone
services::SharedPtr< Online< algorithmFPType, method > > clone() const
Definition: qr_online.h:198
daal::algorithms::qr::interface1::OnlineContainer::OnlineContainer
OnlineContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::qr::interface1::Online::getResult
ResultPtr getResult()
Definition: qr_online.h:153
daal::algorithms::qr::interface1::Online
Computes the results of the QR decomposition algorithm in the online processing mode.
Definition: qr_online.h:113
daal::algorithms::qr::interface1::Online::getPartialResult
PartialResultPtr getPartialResult()
Definition: qr_online.h:162
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::qr::interface1::Online::Online
Online(const Online< algorithmFPType, method > &other)
Definition: qr_online.h:138
daal::algorithms::qr::interface1::Online::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: qr_online.h:147
daal::algorithms::qr::interface1::OnlineContainer::compute
virtual services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::algorithms::qr::interface1::Online::setPartialResult
services::Status setPartialResult(const PartialResultPtr &partialResult, bool initFlag=false)
Definition: qr_online.h:185
daal::online
Definition: daal_defines.h:134
daal::algorithms::qr::interface1::OnlineContainer
Provides methods to run implementations of the QR decomposition algorithm in the online processing mo...
Definition: qr_online.h:80
daal::services::ErrorNullResult
Definition: error_indexes.h:122