48 #ifndef __COVARIANCE_TYPES_H__
49 #define __COVARIANCE_TYPES_H__
51 #include "data_management/data/homogen_numeric_table.h"
105 lastPartialResultId = sum
115 correlation = covariance,
124 enum OutputMatrixType
137 lastMasterInputId = partialResults
149 class DAAL_EXPORT InputIface :
public daal::algorithms::Input
152 InputIface(
size_t nElements) : daal::algorithms::Input(nElements) {}
153 InputIface(
const InputIface& other) : daal::algorithms::Input(other){}
154 virtual size_t getNumberOfFeatures()
const = 0;
155 virtual ~InputIface() {}
162 class DAAL_EXPORT Input :
public InputIface
166 Input(
const Input& other) : InputIface(other){}
174 size_t getNumberOfFeatures()
const DAAL_C11_OVERRIDE;
181 data_management::NumericTablePtr
get(InputId id)
const;
188 void set(InputId
id,
const data_management::NumericTablePtr &ptr);
195 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
204 class DAAL_EXPORT PartialResult :
public daal::algorithms::PartialResult
207 DECLARE_SERIALIZABLE_CAST(PartialResult);
210 virtual ~PartialResult()
219 template <
typename algorithmFPType>
220 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
229 template <
typename algorithmFPType>
230 DAAL_EXPORT services::Status initialize(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
236 size_t getNumberOfFeatures()
const;
243 data_management::NumericTablePtr
get(PartialResultId id)
const;
250 void set(PartialResultId
id,
const data_management::NumericTablePtr &ptr);
258 services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
265 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
269 services::Status checkImpl(
size_t nFeatures)
const;
272 template<
typename Archive,
bool onDeserialize>
273 services::Status serialImpl(Archive *arch)
275 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
278 typedef services::SharedPtr<PartialResult> PartialResultPtr;
284 struct DAAL_EXPORT Parameter :
public daal::algorithms::Parameter
288 OutputMatrixType outputMatrixType;
295 struct DAAL_EXPORT OnlineParameter :
public Parameter
304 OnlineParameter(
const OnlineParameter& other);
309 services::Status check()
const DAAL_C11_OVERRIDE;
317 class DAAL_EXPORT Result :
public daal::algorithms::Result
320 DECLARE_SERIALIZABLE_CAST(Result);
323 virtual ~Result() {};
331 template <
typename algorithmFPType>
332 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
340 template <
typename algorithmFPType>
341 DAAL_EXPORT services::Status allocate(
const daal::algorithms::PartialResult *partialResult,
const daal::algorithms::Parameter *parameter,
const int method);
348 data_management::NumericTablePtr
get(ResultId id)
const;
355 void set(ResultId
id,
const data_management::NumericTablePtr &value);
363 services::Status check(
const daal::algorithms::PartialResult *partialResult,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
371 services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
375 services::Status checkImpl(
size_t nFeatures, OutputMatrixType outputMatrixType)
const;
378 template<
typename Archive,
bool onDeserialize>
379 services::Status serialImpl(Archive *arch)
381 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
384 typedef services::SharedPtr<Result> ResultPtr;
392 template<ComputeStep step>
393 class DistributedInput {};
401 class DAAL_EXPORT DistributedInput<step1Local> :
public Input
404 DistributedInput() : Input()
406 DistributedInput(
const DistributedInput& other) : Input(other)
409 virtual ~DistributedInput()
419 class DAAL_EXPORT DistributedInput<step2Master> :
public InputIface
423 DistributedInput(
const DistributedInput& other) : InputIface(other)
426 virtual ~DistributedInput()
433 size_t getNumberOfFeatures()
const DAAL_C11_OVERRIDE;
440 void add(MasterInputId
id,
const PartialResultPtr &partialResult);
447 data_management::DataCollectionPtr
get(MasterInputId id)
const;
454 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
458 using interface1::InputIface;
459 using interface1::Input;
460 using interface1::PartialResult;
461 using interface1::PartialResultPtr;
462 using interface1::Parameter;
463 using interface1::OnlineParameter;
464 using interface1::Result;
465 using interface1::ResultPtr;
466 using interface1::DistributedInput;
471 #endif // __COVARIANCE_TYPES_H__
daal::algorithms::covariance::singlePassCSR
Definition: covariance_types.h:80
daal::algorithms::covariance::interface1::OnlineParameter
Parameters of the correlation or variance-covariance matrix algorithm in the online processing mode...
Definition: covariance_types.h:295
daal::algorithms::covariance::crossProduct
Definition: covariance_types.h:103
daal
Definition: algorithm_base_common.h:57
daal::algorithms::covariance::interface1::Parameter
Parameters of the correlation or variance-covariance matrix algorithm.
Definition: covariance_types.h:284
daal::algorithms::covariance::Method
Method
Definition: covariance_types.h:72
daal::algorithms::covariance::PartialResultId
PartialResultId
Definition: covariance_types.h:100
daal::algorithms::covariance::sumDense
Definition: covariance_types.h:77
daal::algorithms::covariance::fastCSR
Definition: covariance_types.h:79
daal::algorithms::covariance::data
Definition: covariance_types.h:92
daal::algorithms::covariance::MasterInputId
MasterInputId
Available identifiers of master node input arguments of the Covariance algorithm. ...
Definition: covariance_types.h:134
daal::algorithms::covariance::sum
Definition: covariance_types.h:104
daal::algorithms::covariance::interface1::Result
Provides methods to access final results obtained with the compute() method of the correlation or var...
Definition: covariance_types.h:317
daal::algorithms::covariance::sumCSR
Definition: covariance_types.h:82
daal::algorithms::covariance::partialResults
Definition: covariance_types.h:136
daal::algorithms::covariance::interface1::PartialResult
Provides methods to access partial results obtained with the compute() method of the correlation or v...
Definition: covariance_types.h:204
daal::algorithms::covariance::ResultId
ResultId
Available identifiers of results of the correlation or variance-covariance matrix algorithm...
Definition: covariance_types.h:112
daal::algorithms::covariance::mean
Definition: covariance_types.h:116
daal::algorithms::covariance::InputId
InputId
Definition: covariance_types.h:90
daal::algorithms::covariance::interface1::Parameter::outputMatrixType
OutputMatrixType outputMatrixType
Definition: covariance_types.h:288
daal::algorithms::covariance::OutputMatrixType
OutputMatrixType
Definition: covariance_types.h:124
daal::algorithms::covariance::covariance
Definition: covariance_types.h:114
daal::algorithms::covariance::correlationMatrix
Definition: covariance_types.h:127
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::step1Local
Definition: daal_defines.h:142
daal::step2Master
Definition: daal_defines.h:143
daal::algorithms::covariance::covarianceMatrix
Definition: covariance_types.h:126
daal::algorithms::covariance::defaultDense
Definition: covariance_types.h:74
daal::algorithms::covariance::correlation
Definition: covariance_types.h:115
daal::algorithms::covariance::nObservations
Definition: covariance_types.h:102
daal::algorithms::covariance::singlePassDense
Definition: covariance_types.h:75