49 #ifndef __QR_TYPES_H__ 50 #define __QR_TYPES_H__ 52 #include "algorithms/algorithm.h" 53 #include "data_management/data/numeric_table.h" 54 #include "data_management/data/homogen_numeric_table.h" 55 #include "services/daal_defines.h" 103 lastResultId = matrixR
113 outputOfStep1ForStep3,
115 outputOfStep1ForStep2,
117 lastPartialResultId = outputOfStep1ForStep2
125 enum DistributedPartialResultCollectionId
127 outputOfStep2ForStep3,
129 lastDistributedPartialResultCollectionId = outputOfStep2ForStep3
136 enum DistributedPartialResultId
138 finalResultFromStep2Master = lastDistributedPartialResultCollectionId + 1,
139 lastDistributedPartialResultId = finalResultFromStep2Master
146 enum DistributedPartialResultStep3Id
148 finalResultFromStep3,
149 lastDistributedPartialResultStep3Id = finalResultFromStep3
158 inputOfStep2FromStep1,
160 lastMasterInputId = inputOfStep2FromStep1
167 enum FinalizeOnLocalInputId
169 inputOfStep3FromStep1,
171 inputOfStep3FromStep2,
173 lastFinalizeOnLocalInputId = inputOfStep3FromStep2
186 class DAAL_EXPORT Input :
public daal::algorithms::Input
193 Input(
const Input& other);
203 data_management::NumericTablePtr
get(InputId id)
const;
210 void set(InputId id,
const data_management::NumericTablePtr &value);
212 services::Status getNumberOfColumns(
size_t *nFeatures)
const;
214 services::Status getNumberOfRows(
size_t *nRows)
const;
221 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
228 class DAAL_EXPORT DistributedStep2Input :
public daal::algorithms::Input
232 DistributedStep2Input();
235 DistributedStep2Input(
const DistributedStep2Input& other);
241 services::Status getNumberOfColumns(
size_t *nFeatures)
const;
248 void set(MasterInputId id,
const data_management::KeyValueDataCollectionPtr &ptr);
255 data_management::KeyValueDataCollectionPtr
get(MasterInputId id)
const;
263 void add(MasterInputId
id,
size_t key,
const data_management::DataCollectionPtr &value);
276 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
283 class DAAL_EXPORT DistributedStep3Input :
public daal::algorithms::Input
287 DistributedStep3Input();
290 DistributedStep3Input(
const DistributedStep3Input& other);
297 data_management::DataCollectionPtr
get(FinalizeOnLocalInputId id)
const;
304 void set(FinalizeOnLocalInputId id,
const data_management::DataCollectionPtr &value);
306 services::Status getSizes(
size_t &nFeatures,
size_t &nVectors)
const;
313 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
321 class DAAL_EXPORT OnlinePartialResult :
public daal::algorithms::PartialResult
324 DECLARE_SERIALIZABLE_CAST(OnlinePartialResult);
326 OnlinePartialResult();
328 virtual ~OnlinePartialResult() {}
336 template <
typename algorithmFPType>
337 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
346 template <
typename algorithmFPType>
347 DAAL_EXPORT services::Status initialize(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
355 template <
typename algorithmFPType>
356 DAAL_EXPORT services::Status addPartialResultStorage(
size_t m,
size_t n);
363 data_management::DataCollectionPtr
get(PartialResultId id)
const;
370 void set(PartialResultId id,
const data_management::DataCollectionPtr &value);
378 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
385 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
392 size_t getNumberOfColumns()
const;
398 size_t getNumberOfRows()
const;
402 template<
typename Archive,
bool onDeserialize>
403 services::Status serialImpl(Archive *arch)
405 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
408 services::Status checkImpl(
const daal::algorithms::Parameter *parameter,
int method,
size_t nFeatures,
size_t nVectors)
const;
410 typedef services::SharedPtr<OnlinePartialResult> OnlinePartialResultPtr;
418 class DAAL_EXPORT Result :
public daal::algorithms::Result
421 DECLARE_SERIALIZABLE_CAST(Result);
432 data_management::NumericTablePtr
get(ResultId id)
const;
440 template <
typename algorithmFPType>
441 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
449 template <
typename algorithmFPType>
450 DAAL_EXPORT services::Status allocate(
const daal::algorithms::PartialResult *partialResult, daal::algorithms::Parameter *parameter,
const int method);
457 void set(ResultId id,
const data_management::NumericTablePtr &value);
465 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
473 virtual services::Status check(
const daal::algorithms::PartialResult *pres,
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
481 template <
typename algorithmFPType>
482 DAAL_EXPORT services::Status allocateImpl(
size_t m,
size_t n);
486 template<
typename Archive,
bool onDeserialize>
487 services::Status serialImpl(Archive *arch)
489 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
492 typedef services::SharedPtr<Result> ResultPtr;
499 class DAAL_EXPORT DistributedPartialResult :
public daal::algorithms::PartialResult
502 DECLARE_SERIALIZABLE_CAST(DistributedPartialResult);
504 DistributedPartialResult();
506 virtual ~DistributedPartialResult() {}
514 template <
typename algorithmFPType>
515 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
527 template <
typename algorithmFPType>
528 DAAL_EXPORT services::Status setPartialResultStorage(data_management::KeyValueDataCollection *inCollection,
size_t &nBlocks);
537 data_management::KeyValueDataCollectionPtr
get(DistributedPartialResultCollectionId id)
const;
544 ResultPtr
get(DistributedPartialResultId id)
const;
551 void set(DistributedPartialResultCollectionId id,
const data_management::KeyValueDataCollectionPtr &value);
558 void set(DistributedPartialResultId id,
const ResultPtr &value);
566 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
574 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
578 template<
typename Archive,
bool onDeserialize>
579 services::Status serialImpl(Archive *arch)
581 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
584 typedef services::SharedPtr<DistributedPartialResult>DistributedPartialResultPtr;
591 class DAAL_EXPORT DistributedPartialResultStep3 :
public daal::algorithms::PartialResult
594 DECLARE_SERIALIZABLE_CAST(DistributedPartialResultStep3);
596 DistributedPartialResultStep3();
598 virtual ~DistributedPartialResultStep3() {}
606 template <
typename algorithmFPType>
607 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
615 template <
typename algorithmFPType>
616 DAAL_EXPORT services::Status setPartialResultStorage(data_management::DataCollection *qCollection);
623 ResultPtr
get(DistributedPartialResultStep3Id id)
const;
630 void set(DistributedPartialResultStep3Id id,
const ResultPtr &value);
638 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
646 virtual services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
650 template<
typename Archive,
bool onDeserialize>
651 services::Status serialImpl(Archive *arch)
653 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
656 typedef services::SharedPtr<DistributedPartialResultStep3> DistributedPartialResultStep3Ptr;
662 struct DAAL_EXPORT Parameter :
public daal::algorithms::Parameter
672 using interface1::Input;
673 using interface1::DistributedStep2Input;
674 using interface1::DistributedStep3Input;
675 using interface1::OnlinePartialResult;
676 using interface1::OnlinePartialResultPtr;
677 using interface1::Result;
678 using interface1::ResultPtr;
679 using interface1::DistributedPartialResult;
680 using interface1::DistributedPartialResultPtr;
681 using interface1::DistributedPartialResultStep3;
682 using interface1::DistributedPartialResultStep3Ptr;
683 using interface1::Parameter;
daal::algorithms::qr::DistributedPartialResultCollectionId
DistributedPartialResultCollectionId
Definition: qr_types.h:125
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::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
Definition: algorithm_base_common.h:57
daal::algorithms::qr::outputOfStep1ForStep2
Definition: qr_types.h:115
daal::algorithms::interface1::Result
Base class to represent final results of the computation. Algorithm-specific final results are repres...
Definition: algorithm_types.h:331
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::DistributedPartialResultStep3::~DistributedPartialResultStep3
virtual ~DistributedPartialResultStep3()
Definition: qr_types.h:598
daal::algorithms::qr::finalResultFromStep2Master
Definition: qr_types.h:138
daal::data_management::interface1::DataCollection
Class that provides functionality of Collection container for objects derived from SerializationIface...
Definition: data_collection.h:71
daal::algorithms::qr::matrixR
Definition: qr_types.h:102
daal::algorithms::qr::FinalizeOnLocalInputId
FinalizeOnLocalInputId
Definition: qr_types.h:167
daal::algorithms::qr::defaultDense
Definition: qr_types.h:82
daal::algorithms::interface1::PartialResult
Base class to represent partial results of the computation. Algorithm-specific partial results are re...
Definition: algorithm_types.h:253
daal::algorithms::qr::inputOfStep3FromStep1
Definition: qr_types.h:169
daal::algorithms::qr::outputOfStep2ForStep3
Definition: qr_types.h:127
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:86
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::algorithms::qr::InputId
InputId
Definition: qr_types.h:89
daal::algorithms::qr::interface1::Parameter::Parameter
Parameter()
Definition: qr_types.h:667
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:499
daal::algorithms::qr::data
Definition: qr_types.h:91
daal::algorithms::qr::interface1::OnlinePartialResult::~OnlinePartialResult
virtual ~OnlinePartialResult()
Definition: qr_types.h:328
daal::algorithms::qr::Method
Method
Definition: qr_types.h:80
daal::algorithms::qr::PartialResultId
PartialResultId
Definition: qr_types.h:111
daal::algorithms::qr::DistributedPartialResultStep3Id
DistributedPartialResultStep3Id
Definition: qr_types.h:146
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::qr::inputOfStep3FromStep2
Definition: qr_types.h:171
daal::algorithms::qr::matrixQ
Definition: qr_types.h:101
daal::algorithms::qr::finalResultFromStep3
Definition: qr_types.h:148
daal::algorithms::qr::interface1::DistributedPartialResult::~DistributedPartialResult
virtual ~DistributedPartialResult()
Definition: qr_types.h:506
daal::algorithms::qr::ResultId
ResultId
Definition: qr_types.h:99
daal::algorithms::qr::DistributedPartialResultId
DistributedPartialResultId
Definition: qr_types.h:136
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:591
daal::algorithms::qr::MasterInputId
MasterInputId
Definition: qr_types.h:156
daal::algorithms::qr::inputOfStep2FromStep1
Definition: qr_types.h:158
daal::algorithms::qr::outputOfStep1ForStep3
Definition: qr_types.h:113
daal::algorithms::qr::interface1::Result::~Result
virtual ~Result()
Definition: qr_types.h:425