25 #ifndef __QR_TYPES_H__
26 #define __QR_TYPES_H__
28 #include "algorithms/algorithm.h"
29 #include "data_management/data/numeric_table.h"
30 #include "data_management/data/homogen_numeric_table.h"
31 #include "services/daal_defines.h"
79 lastResultId = matrixR
89 outputOfStep1ForStep3,
91 outputOfStep1ForStep2,
93 lastPartialResultId = outputOfStep1ForStep2
101 enum DistributedPartialResultCollectionId
103 outputOfStep2ForStep3,
105 lastDistributedPartialResultCollectionId = outputOfStep2ForStep3
112 enum DistributedPartialResultId
114 finalResultFromStep2Master = lastDistributedPartialResultCollectionId + 1,
115 lastDistributedPartialResultId = finalResultFromStep2Master
122 enum DistributedPartialResultStep3Id
124 finalResultFromStep3,
125 lastDistributedPartialResultStep3Id = finalResultFromStep3
134 inputOfStep2FromStep1,
136 lastMasterInputId = inputOfStep2FromStep1
143 enum FinalizeOnLocalInputId
145 inputOfStep3FromStep1,
147 inputOfStep3FromStep2,
149 lastFinalizeOnLocalInputId = inputOfStep3FromStep2
162 class DAAL_EXPORT Input :
public daal::algorithms::Input
169 Input(
const Input& other);
179 data_management::NumericTablePtr
get(InputId id)
const;
186 void set(InputId
id,
const data_management::NumericTablePtr &value);
188 services::Status getNumberOfColumns(
size_t *nFeatures)
const;
190 services::Status getNumberOfRows(
size_t *nRows)
const;
197 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
204 class DAAL_EXPORT DistributedStep2Input :
public daal::algorithms::Input
208 DistributedStep2Input();
211 DistributedStep2Input(
const DistributedStep2Input& other);
217 services::Status getNumberOfColumns(
size_t *nFeatures)
const;
224 void set(MasterInputId
id,
const data_management::KeyValueDataCollectionPtr &ptr);
231 data_management::KeyValueDataCollectionPtr
get(MasterInputId id)
const;
239 void add(MasterInputId
id,
size_t key,
const data_management::DataCollectionPtr &value);
252 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
259 class DAAL_EXPORT DistributedStep3Input :
public daal::algorithms::Input
263 DistributedStep3Input();
266 DistributedStep3Input(
const DistributedStep3Input& other);
273 data_management::DataCollectionPtr
get(FinalizeOnLocalInputId id)
const;
280 void set(FinalizeOnLocalInputId
id,
const data_management::DataCollectionPtr &value);
282 services::Status getSizes(
size_t &nFeatures,
size_t &nVectors)
const;
289 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
297 class DAAL_EXPORT OnlinePartialResult :
public daal::algorithms::PartialResult
300 DECLARE_SERIALIZABLE_CAST(OnlinePartialResult);
302 OnlinePartialResult();
304 virtual ~OnlinePartialResult() {}
312 template <
typename algorithmFPType>
313 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
322 template <
typename algorithmFPType>
323 DAAL_EXPORT services::Status initialize(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
331 template <
typename algorithmFPType>
332 DAAL_EXPORT services::Status addPartialResultStorage(
size_t m,
size_t n);
339 data_management::DataCollectionPtr
get(PartialResultId id)
const;
346 void set(PartialResultId
id,
const data_management::DataCollectionPtr &value);
354 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
361 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
368 size_t getNumberOfColumns()
const;
374 size_t getNumberOfRows()
const;
378 template<
typename Archive,
bool onDeserialize>
379 services::Status serialImpl(Archive *arch)
381 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
384 services::Status checkImpl(
const daal::algorithms::Parameter *parameter,
int method,
size_t nFeatures,
size_t nVectors)
const;
386 typedef services::SharedPtr<OnlinePartialResult> OnlinePartialResultPtr;
394 class DAAL_EXPORT Result :
public daal::algorithms::Result
397 DECLARE_SERIALIZABLE_CAST(Result);
408 data_management::NumericTablePtr
get(ResultId id)
const;
416 template <
typename algorithmFPType>
417 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
425 template <
typename algorithmFPType>
426 DAAL_EXPORT services::Status allocate(
const daal::algorithms::PartialResult *partialResult, daal::algorithms::Parameter *parameter,
const int method);
433 void set(ResultId
id,
const data_management::NumericTablePtr &value);
441 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
449 virtual services::Status check(
const daal::algorithms::PartialResult *pres,
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
457 template <
typename algorithmFPType>
458 DAAL_EXPORT services::Status allocateImpl(
size_t m,
size_t n);
462 template<
typename Archive,
bool onDeserialize>
463 services::Status serialImpl(Archive *arch)
465 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
468 typedef services::SharedPtr<Result> ResultPtr;
475 class DAAL_EXPORT DistributedPartialResult :
public daal::algorithms::PartialResult
478 DECLARE_SERIALIZABLE_CAST(DistributedPartialResult);
480 DistributedPartialResult();
482 virtual ~DistributedPartialResult() {}
490 template <
typename algorithmFPType>
491 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
503 template <
typename algorithmFPType>
504 DAAL_EXPORT services::Status setPartialResultStorage(data_management::KeyValueDataCollection *inCollection,
size_t &nBlocks);
513 data_management::KeyValueDataCollectionPtr
get(DistributedPartialResultCollectionId id)
const;
520 ResultPtr
get(DistributedPartialResultId id)
const;
527 void set(DistributedPartialResultCollectionId
id,
const data_management::KeyValueDataCollectionPtr &value);
534 void set(DistributedPartialResultId
id,
const ResultPtr &value);
542 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
550 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
554 template<
typename Archive,
bool onDeserialize>
555 services::Status serialImpl(Archive *arch)
557 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
560 typedef services::SharedPtr<DistributedPartialResult>DistributedPartialResultPtr;
567 class DAAL_EXPORT DistributedPartialResultStep3 :
public daal::algorithms::PartialResult
570 DECLARE_SERIALIZABLE_CAST(DistributedPartialResultStep3);
572 DistributedPartialResultStep3();
574 virtual ~DistributedPartialResultStep3() {}
582 template <
typename algorithmFPType>
583 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
591 template <
typename algorithmFPType>
592 DAAL_EXPORT services::Status setPartialResultStorage(data_management::DataCollection *qCollection);
599 ResultPtr
get(DistributedPartialResultStep3Id id)
const;
606 void set(DistributedPartialResultStep3Id
id,
const ResultPtr &value);
614 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
622 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
626 template<
typename Archive,
bool onDeserialize>
627 services::Status serialImpl(Archive *arch)
629 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
632 typedef services::SharedPtr<DistributedPartialResultStep3> DistributedPartialResultStep3Ptr;
638 struct DAAL_EXPORT Parameter :
public daal::algorithms::Parameter
648 using interface1::Input;
649 using interface1::DistributedStep2Input;
650 using interface1::DistributedStep3Input;
651 using interface1::OnlinePartialResult;
652 using interface1::OnlinePartialResultPtr;
653 using interface1::Result;
654 using interface1::ResultPtr;
655 using interface1::DistributedPartialResult;
656 using interface1::DistributedPartialResultPtr;
657 using interface1::DistributedPartialResultStep3;
658 using interface1::DistributedPartialResultStep3Ptr;
659 using interface1::Parameter;
daal::algorithms::qr::outputOfStep1ForStep3
Definition: qr_types.h:89
daal::algorithms::qr::InputId
InputId
Definition: qr_types.h:65
daal::algorithms::qr::interface1::DistributedPartialResult
Provides methods to access partial results obtained with the compute() method of the second step of t...
Definition: qr_types.h:475
daal::algorithms::qr::interface1::Result::~Result
virtual ~Result()
Definition: qr_types.h:401
daal::algorithms::qr::finalResultFromStep3
Definition: qr_types.h:124
daal::algorithms::qr::matrixR
Definition: qr_types.h:78
daal::algorithms::qr::matrixQ
Definition: qr_types.h:77
daal::algorithms::qr::DistributedPartialResultCollectionId
DistributedPartialResultCollectionId
Definition: qr_types.h:101
daal::algorithms::qr::interface1::OnlinePartialResult::~OnlinePartialResult
virtual ~OnlinePartialResult()
Definition: qr_types.h:304
daal::algorithms::qr::inputOfStep2FromStep1
Definition: qr_types.h:134
daal::algorithms::interface1::Result
Base class to represent final results of the computation. Algorithm-specific final results are repres...
Definition: algorithm_types.h:309
daal::algorithms::qr::interface1::DistributedStep2Input
Input objects for the second step of the QR decomposition algorithm in the distributed processing mod...
Definition: qr_types.h:204
daal::algorithms::qr::defaultDense
Definition: qr_types.h:58
daal::algorithms::qr::interface1::Input
Input objects for the QR decomposition algorithm in the batch and online processing modes and for the...
Definition: qr_types.h:162
daal::algorithms::qr::interface1::DistributedPartialResultStep3
Provides methods to access partial results obtained with the compute() method of the third step of th...
Definition: qr_types.h:567
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:394
daal::algorithms::qr::interface1::DistributedStep3Input
Input objects for the third step of the QR decomposition algorithm in the distributed processing mode...
Definition: qr_types.h:259
daal::algorithms::qr::FinalizeOnLocalInputId
FinalizeOnLocalInputId
Definition: qr_types.h:143
daal::algorithms::interface1::Input
Base class to represent computation input arguments. Algorithm-specific input arguments are represent...
Definition: algorithm_types.h:193
daal::algorithms::qr::data
Definition: qr_types.h:67
daal::algorithms::qr::MasterInputId
MasterInputId
Definition: qr_types.h:132
daal::algorithms::qr::ResultId
ResultId
Definition: qr_types.h:75
daal::algorithms::qr::finalResultFromStep2Master
Definition: qr_types.h:114
daal::algorithms::qr::outputOfStep2ForStep3
Definition: qr_types.h:103
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:62
daal::algorithms::qr::outputOfStep1ForStep2
Definition: qr_types.h:91
daal::algorithms::qr::Method
Method
Definition: qr_types.h:56
daal::algorithms::qr::interface1::DistributedPartialResultStep3::~DistributedPartialResultStep3
virtual ~DistributedPartialResultStep3()
Definition: qr_types.h:574
daal::algorithms::qr::interface1::Input::~Input
virtual ~Input()
Definition: qr_types.h:172
daal::algorithms::qr::DistributedPartialResultId
DistributedPartialResultId
Definition: qr_types.h:112
daal::algorithms::qr::interface1::OnlinePartialResult
Provides methods to access partial results obtained with the compute() method of the QR decomposition...
Definition: qr_types.h:297
daal::algorithms::qr::DistributedPartialResultStep3Id
DistributedPartialResultStep3Id
Definition: qr_types.h:122
daal::algorithms::qr::inputOfStep3FromStep2
Definition: qr_types.h:147
daal::algorithms::qr::interface1::Parameter::Parameter
Parameter()
Definition: qr_types.h:643
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::qr::PartialResultId
PartialResultId
Definition: qr_types.h:87
daal::algorithms::qr::interface1::Parameter
Parameters for the QR decomposition compute method.
Definition: qr_types.h:638
daal::algorithms::qr::inputOfStep3FromStep1
Definition: qr_types.h:145
daal::algorithms::qr::interface1::DistributedPartialResult::~DistributedPartialResult
virtual ~DistributedPartialResult()
Definition: qr_types.h:482