C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 2

pca_transform_types.h
1 /* file: pca_transform_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Definition of PCA transform common types.
45 //--
46 */
47 
48 
49 #ifndef __PCA_TRANSFORM_TYPES_H__
50 #define __PCA_TRANSFORM_TYPES_H__
51 
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"
56 
57 namespace daal
58 {
59 namespace algorithms
60 {
61 namespace pca
62 {
71 namespace transform
72 {
77 enum Method
78 {
79  defaultDense = 0
80 };
81 
86 enum InputId
87 {
88  data = 0,
89  eigenvectors,
90  lastInputId = eigenvectors
91 };
92 
97 enum TransformComponentId
98 {
99  mean = 0x00000001ULL,
100  variance = 0x00000002ULL,
101  eigenvalue = 0x00000004ULL
102 };
103 
108 enum TransformDataInputId
109 {
110  dataForTransform = lastInputId + 1,
111  lastdataForTransformInputId = dataForTransform
112 };
113 
118 enum ResultId
119 {
120  transformedData = 0,
121  lastResultId = transformedData
122 };
123 
124 
128 namespace interface1
129 {
135 class DAAL_EXPORT Input : public daal::algorithms::Input
136 {
137 public:
139  Input();
140 
142  Input(const Input& other);
143 
145  virtual ~Input() {}
146 
152  data_management::NumericTablePtr get(InputId id) const;
153 
159  data_management::KeyValueDataCollectionPtr get(TransformDataInputId id) const;
160 
167  data_management::NumericTablePtr get(TransformDataInputId wid, TransformComponentId id) const;
168 
174  void set(InputId id, const data_management::NumericTablePtr &value);
175 
181  void set(TransformDataInputId id, const data_management::KeyValueDataCollectionPtr &value);
182 
189  void set(TransformDataInputId wid, TransformComponentId id, const data_management::NumericTablePtr &value);
190 
196  virtual services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
197 };
198 
199 
206 class DAAL_EXPORT Result : public daal::algorithms::Result
207 {
208 public:
209  DECLARE_SERIALIZABLE_CAST(Result);
211  Result();
213  virtual ~Result() {}
214 
220  data_management::NumericTablePtr get(ResultId id) const;
221 
228  template <typename algorithmFPType>
229  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
230 
231 
237  void set(ResultId id, const data_management::NumericTablePtr &value);
238 
245  virtual services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
246 
247 };
248 typedef services::SharedPtr<daal::algorithms::pca::transform::interface1::Result> ResultPtr;
249 
254 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
255 {
260  Parameter(size_t nComponents = 0);
261 
265  size_t nComponents;
266 };
269 } // namespace interface1
270 using interface1::Input;
271 using interface1::Result;
272 using interface1::ResultPtr;
273 using interface1::Parameter;
274 
275 } // namespace daal::algorithms::transform
276 } // namespace daal::algorithms::pca
277 } // namespace daal::algorithms
278 } // namespace daal
279 #endif
daal::algorithms::pca::transform::interface1::Parameter
Parameters for the PCA transformation compute method.
Definition: pca_transform_types.h:254
daal::algorithms::pca::transform::TransformComponentId
TransformComponentId
Definition: pca_transform_types.h:97
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::interface1::Result
Base class to represent final results of the computation. Algorithm-specific final results are repres...
Definition: algorithm_types.h:331
daal::algorithms::pca::transform::data
Definition: pca_transform_types.h:88
daal::algorithms::pca::transform::eigenvectors
Definition: pca_transform_types.h:89
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:135
daal::algorithms::pca::transform::eigenvalue
Definition: pca_transform_types.h:101
daal::algorithms::pca::transform::transformedData
Definition: pca_transform_types.h:120
daal::algorithms::pca::transform::Method
Method
Definition: pca_transform_types.h:77
daal_defines.h
daal::algorithms::pca::transform::interface1::Input::~Input
virtual ~Input()
Definition: pca_transform_types.h:145
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:206
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::pca::transform::interface1::Parameter::nComponents
size_t nComponents
Definition: pca_transform_types.h:265
daal::algorithms::pca::transform::TransformDataInputId
TransformDataInputId
Definition: pca_transform_types.h:108
daal::algorithms::pca::transform::InputId
InputId
Definition: pca_transform_types.h:86
daal::algorithms::pca::transform::mean
Definition: pca_transform_types.h:99
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::pca::transform::defaultDense
Definition: pca_transform_types.h:79
daal::algorithms::pca::transform::dataForTransform
Definition: pca_transform_types.h:110
daal::algorithms::interface1::Input
Base class to represent computation input arguments. Algorithm-specific input arguments are represent...
Definition: algorithm_types.h:217
daal::algorithms::pca::transform::interface1::Result::~Result
virtual ~Result()
Definition: pca_transform_types.h:213
daal::algorithms::pca::transform::ResultId
ResultId
Definition: pca_transform_types.h:118
daal::algorithms::pca::transform::variance
Definition: pca_transform_types.h:100

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