22 #ifndef __COVARIANCE_TYPES_H__
23 #define __COVARIANCE_TYPES_H__
25 #include "data_management/data/homogen_numeric_table.h"
79 lastPartialResultId = sum
89 correlation = covariance,
111 lastMasterInputId = partialResults
123 class DAAL_EXPORT InputIface :
public daal::algorithms::Input
126 InputIface(
size_t nElements) : daal::algorithms::Input(nElements) {}
127 InputIface(
const InputIface& other) : daal::algorithms::Input(other){}
128 virtual size_t getNumberOfFeatures()
const = 0;
129 virtual ~InputIface() {}
136 class DAAL_EXPORT Input :
public InputIface
140 Input(
const Input& other) : InputIface(other){}
148 size_t getNumberOfFeatures()
const DAAL_C11_OVERRIDE;
155 data_management::NumericTablePtr
get(InputId id)
const;
162 void set(InputId
id,
const data_management::NumericTablePtr &ptr);
169 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
178 class DAAL_EXPORT PartialResult :
public daal::algorithms::PartialResult
181 DECLARE_SERIALIZABLE_CAST(PartialResult);
184 virtual ~PartialResult()
193 template <
typename algorithmFPType>
194 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
203 template <
typename algorithmFPType>
204 DAAL_EXPORT services::Status initialize(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
210 size_t getNumberOfFeatures()
const;
217 data_management::NumericTablePtr
get(PartialResultId id)
const;
224 void set(PartialResultId
id,
const data_management::NumericTablePtr &ptr);
232 services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
239 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
243 services::Status checkImpl(
size_t nFeatures)
const;
246 template<
typename Archive,
bool onDeserialize>
247 services::Status serialImpl(Archive *arch)
249 return daal::algorithms::PartialResult::serialImpl<Archive, onDeserialize>(arch);
252 typedef services::SharedPtr<PartialResult> PartialResultPtr;
258 struct DAAL_EXPORT Parameter :
public daal::algorithms::Parameter
262 OutputMatrixType outputMatrixType;
269 struct DAAL_EXPORT OnlineParameter :
public Parameter
278 OnlineParameter(
const OnlineParameter& other);
283 services::Status check()
const DAAL_C11_OVERRIDE;
291 class DAAL_EXPORT Result :
public daal::algorithms::Result
294 DECLARE_SERIALIZABLE_CAST(Result);
297 virtual ~Result() {};
305 template <
typename algorithmFPType>
306 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
const int method);
314 template <
typename algorithmFPType>
315 DAAL_EXPORT services::Status allocate(
const daal::algorithms::PartialResult *partialResult,
const daal::algorithms::Parameter *parameter,
const int method);
322 data_management::NumericTablePtr
get(ResultId id)
const;
329 void set(ResultId
id,
const data_management::NumericTablePtr &value);
337 services::Status check(
const daal::algorithms::PartialResult *partialResult,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
345 services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
349 services::Status checkImpl(
size_t nFeatures, OutputMatrixType outputMatrixType)
const;
352 template<
typename Archive,
bool onDeserialize>
353 services::Status serialImpl(Archive *arch)
355 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
358 typedef services::SharedPtr<Result> ResultPtr;
366 template<ComputeStep step>
367 class DistributedInput {};
375 class DAAL_EXPORT DistributedInput<step1Local> :
public Input
378 DistributedInput() : Input()
380 DistributedInput(
const DistributedInput& other) : Input(other)
383 virtual ~DistributedInput()
393 class DAAL_EXPORT DistributedInput<step2Master> :
public InputIface
397 DistributedInput(
const DistributedInput& other) : InputIface(other)
400 virtual ~DistributedInput()
407 size_t getNumberOfFeatures()
const DAAL_C11_OVERRIDE;
414 void add(MasterInputId
id,
const PartialResultPtr &partialResult);
421 data_management::DataCollectionPtr
get(MasterInputId id)
const;
428 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
432 using interface1::InputIface;
433 using interface1::Input;
434 using interface1::PartialResult;
435 using interface1::PartialResultPtr;
436 using interface1::Parameter;
437 using interface1::OnlineParameter;
438 using interface1::Result;
439 using interface1::ResultPtr;
440 using interface1::DistributedInput;
445 #endif // __COVARIANCE_TYPES_H__
daal::algorithms::covariance::singlePassCSR
Definition: covariance_types.h:54
daal::algorithms::covariance::interface1::OnlineParameter
Parameters of the correlation or variance-covariance matrix algorithm in the online processing mode...
Definition: covariance_types.h:269
daal::algorithms::covariance::crossProduct
Definition: covariance_types.h:77
daal
Definition: algorithm_base_common.h:31
daal::algorithms::covariance::interface1::Parameter
Parameters of the correlation or variance-covariance matrix algorithm.
Definition: covariance_types.h:258
daal::algorithms::covariance::Method
Method
Definition: covariance_types.h:46
daal::algorithms::covariance::PartialResultId
PartialResultId
Definition: covariance_types.h:74
daal::algorithms::covariance::sumDense
Definition: covariance_types.h:51
daal::algorithms::covariance::fastCSR
Definition: covariance_types.h:53
daal::algorithms::covariance::data
Definition: covariance_types.h:66
daal::algorithms::covariance::MasterInputId
MasterInputId
Available identifiers of master node input arguments of the Covariance algorithm. ...
Definition: covariance_types.h:108
daal::algorithms::covariance::sum
Definition: covariance_types.h:78
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:291
daal::algorithms::covariance::sumCSR
Definition: covariance_types.h:56
daal::algorithms::covariance::partialResults
Definition: covariance_types.h:110
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:178
daal::algorithms::covariance::ResultId
ResultId
Available identifiers of results of the correlation or variance-covariance matrix algorithm...
Definition: covariance_types.h:86
daal::algorithms::covariance::mean
Definition: covariance_types.h:90
daal::algorithms::covariance::InputId
InputId
Definition: covariance_types.h:64
daal::algorithms::covariance::interface1::Parameter::outputMatrixType
OutputMatrixType outputMatrixType
Definition: covariance_types.h:262
daal::algorithms::covariance::OutputMatrixType
OutputMatrixType
Definition: covariance_types.h:98
daal::algorithms::covariance::covariance
Definition: covariance_types.h:88
daal::algorithms::covariance::correlationMatrix
Definition: covariance_types.h:101
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::step1Local
Definition: daal_defines.h:117
daal::step2Master
Definition: daal_defines.h:118
daal::algorithms::covariance::covarianceMatrix
Definition: covariance_types.h:100
daal::algorithms::covariance::defaultDense
Definition: covariance_types.h:48
daal::algorithms::covariance::correlation
Definition: covariance_types.h:89
daal::algorithms::covariance::nObservations
Definition: covariance_types.h:76
daal::algorithms::covariance::singlePassDense
Definition: covariance_types.h:49