C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

pca_transform_types.h
1 /* file: pca_transform_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Definition of PCA transform common types.
21 //--
22 */
23 
24 
25 #ifndef __PCA_TRANSFORM_TYPES_H__
26 #define __PCA_TRANSFORM_TYPES_H__
27 
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"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
37 namespace pca
38 {
47 namespace transform
48 {
53 enum Method
54 {
55  defaultDense = 0
56 };
57 
62 enum InputId
63 {
64  data = 0,
65  eigenvectors,
66  lastInputId = eigenvectors
67 };
68 
73 enum TransformComponentId
74 {
75  mean = 0x00000001ULL,
76  variance = 0x00000002ULL,
77  eigenvalue = 0x00000004ULL
78 };
79 
84 enum TransformDataInputId
85 {
86  dataForTransform = lastInputId + 1,
87  lastdataForTransformInputId = dataForTransform
88 };
89 
94 enum ResultId
95 {
96  transformedData = 0,
97  lastResultId = transformedData
98 };
99 
100 
104 namespace interface1
105 {
111 class DAAL_EXPORT Input : public daal::algorithms::Input
112 {
113 public:
115  Input();
116 
118  Input(const Input& other);
119 
121  virtual ~Input() {}
122 
128  data_management::NumericTablePtr get(InputId id) const;
129 
135  data_management::KeyValueDataCollectionPtr get(TransformDataInputId id) const;
136 
143  data_management::NumericTablePtr get(TransformDataInputId wid, TransformComponentId id) const;
144 
150  void set(InputId id, const data_management::NumericTablePtr &value);
151 
157  void set(TransformDataInputId id, const data_management::KeyValueDataCollectionPtr &value);
158 
165  void set(TransformDataInputId wid, TransformComponentId id, const data_management::NumericTablePtr &value);
166 
172  virtual services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
173 };
174 
175 
182 class DAAL_EXPORT Result : public daal::algorithms::Result
183 {
184 public:
185  DECLARE_SERIALIZABLE_CAST(Result);
187  Result();
189  virtual ~Result() {}
190 
196  data_management::NumericTablePtr get(ResultId id) const;
197 
204  template <typename algorithmFPType>
205  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
206 
207 
213  void set(ResultId id, const data_management::NumericTablePtr &value);
214 
221  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
222 
223 };
224 typedef services::SharedPtr<daal::algorithms::pca::transform::interface1::Result> ResultPtr;
225 
230 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
231 {
236  Parameter(size_t nComponents = 0);
237 
241  size_t nComponents;
242 };
245 } // namespace interface1
246 using interface1::Input;
247 using interface1::Result;
248 using interface1::ResultPtr;
249 using interface1::Parameter;
250 
251 } // namespace daal::algorithms::transform
252 } // namespace daal::algorithms::pca
253 } // namespace daal::algorithms
254 } // namespace daal
255 #endif
daal::algorithms::pca::transform::transformedData
Definition: pca_transform_types.h:96
daal::algorithms::pca::transform::variance
Definition: pca_transform_types.h:76
daal::algorithms::pca::transform::InputId
InputId
Definition: pca_transform_types.h:62
daal::algorithms::pca::transform::interface1::Input::~Input
virtual ~Input()
Definition: pca_transform_types.h:121
daal::algorithms::pca::transform::interface1::Parameter::nComponents
size_t nComponents
Definition: pca_transform_types.h:241
daal::algorithms::pca::transform::defaultDense
Definition: pca_transform_types.h:55
daal::algorithms::pca::transform::TransformComponentId
TransformComponentId
Definition: pca_transform_types.h:73
daal::algorithms::pca::transform::dataForTransform
Definition: pca_transform_types.h:86
daal_defines.h
daal::algorithms::pca::transform::Method
Method
Definition: pca_transform_types.h:53
daal::algorithms::pca::transform::data
Definition: pca_transform_types.h:64
daal::algorithms::pca::transform::mean
Definition: pca_transform_types.h:75
daal::algorithms::pca::transform::ResultId
ResultId
Definition: pca_transform_types.h:94
daal::algorithms::pca::transform::interface1::Input
Input objects for the PCA transformation algorithm in the batch and online processing modes and for t...
Definition: pca_transform_types.h:111
daal::algorithms::pca::transform::interface1::Result
Provides methods to access final results obtained with the compute() method of the PCA transformation...
Definition: pca_transform_types.h:182
daal::algorithms::pca::transform::eigenvectors
Definition: pca_transform_types.h:65
daal::algorithms::pca::transform::interface1::Result::~Result
virtual ~Result()
Definition: pca_transform_types.h:189
daal::algorithms::pca::transform::eigenvalue
Definition: pca_transform_types.h:77
daal::algorithms::pca::transform::TransformDataInputId
TransformDataInputId
Definition: pca_transform_types.h:84
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::pca::transform::interface1::Parameter
Parameters for the PCA transformation compute method.
Definition: pca_transform_types.h:230

For more complete information about compiler optimizations, see our Optimization Notice.