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

minmax_types.h
1 /* file: minmax_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 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 common types of min-max normalization.
45 //--
46 */
47 
48 #ifndef __MINMAX_TYPES_H__
49 #define __MINMAX_TYPES_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/numeric_table.h"
53 #include "data_management/data/homogen_numeric_table.h"
54 #include "algorithms/moments/low_order_moments_batch.h"
55 #include "services/daal_defines.h"
56 
57 namespace daal
58 {
59 namespace algorithms
60 {
70 namespace normalization
71 {
81 namespace minmax
82 {
88 enum Method
89 {
90  defaultDense = 0,
91 };
92 
98 enum InputId
99 {
100  data,
101  lastInputId = data
102 };
103 
109 enum ResultId
110 {
111  normalizedData,
112  lastResultId = normalizedData
113 };
114 
118 namespace interface1
119 {
120 
125 struct DAAL_EXPORT ParameterBase : public daal::algorithms::Parameter
126 {
127 public:
129  ParameterBase(double lowerBound, double upperBound, const services::SharedPtr<low_order_moments::BatchImpl> &momentsForParameterBase);
130 
131  double lowerBound;
132  double upperBound;
134  services::SharedPtr<low_order_moments::BatchImpl> moments;
141  virtual services::Status check() const DAAL_C11_OVERRIDE;
142 };
143 
148 template<typename algorithmFPType>
149 struct DAAL_EXPORT Parameter : public ParameterBase
150 {
151 public:
153  Parameter(double lowerBound = 0.0, double upperBound = 1.0);
154 
156  Parameter(double lowerBound, double upperBound, const services::SharedPtr<low_order_moments::BatchImpl> &momentsForParameter);
157 };
158 
163 class DAAL_EXPORT Input : public daal::algorithms::Input
164 {
165 public:
167  Input();
168 
170  Input(const Input& other);
171 
172  virtual ~Input() {}
173 
179  data_management::NumericTablePtr get(InputId id) const;
180 
186  void set(InputId id, const data_management::NumericTablePtr &ptr);
187 
195  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
196 };
197 
203 class DAAL_EXPORT Result : public daal::algorithms::Result
204 {
205 public:
206  DECLARE_SERIALIZABLE_CAST(Result);
207  Result();
208 
209  virtual ~Result() {};
210 
218  template <typename algorithmFPType>
219  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, int method);
220 
226  data_management::NumericTablePtr get(ResultId id) const;
227 
233  void set(ResultId id, const data_management::NumericTablePtr &value);
234 
243  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
244 
245 protected:
247  template<typename Archive, bool onDeserialize>
248  services::Status serialImpl(Archive *arch)
249  {
250  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
251  }
252 };
253 typedef services::SharedPtr<Result> ResultPtr;
256 } // namespace interface1
257 using interface1::ParameterBase;
258 using interface1::Parameter;
259 using interface1::Input;
260 using interface1::Result;
261 using interface1::ResultPtr;
262 
263 } // namespace minmax
264 } // namespace normalization
265 } // namespace algorithms
266 } // namespace daal
267 #endif
daal
Definition: algorithm_base_common.h:57
daal::algorithms::normalization::minmax::defaultDense
Definition: minmax_types.h:90
daal::algorithms::normalization::minmax::ResultId
ResultId
Definition: minmax_types.h:109
daal::algorithms::normalization::minmax::InputId
InputId
Definition: minmax_types.h:98
daal::algorithms::normalization::minmax::Method
Method
Definition: minmax_types.h:88
daal::algorithms::normalization::minmax::interface1::Parameter
Class that specifies the parameters of the algorithm in the batch computing mode. ...
Definition: minmax_types.h:149
daal::algorithms::normalization::minmax::interface1::ParameterBase
Base class that specifies the parameters of the algorithm in the batch computing mode.
Definition: minmax_types.h:125
daal::algorithms::normalization::minmax::interface1::ParameterBase::lowerBound
double lowerBound
Definition: minmax_types.h:131
daal::algorithms::normalization::minmax::interface1::Input
Input objects for the min-max normalization algorithm
Definition: minmax_types.h:163
daal_defines.h
daal::algorithms::normalization::minmax::interface1::Result
Provides methods to access final results obtained with the compute() method of the min-max normalizat...
Definition: minmax_types.h:203
daal::algorithms::normalization::minmax::interface1::ParameterBase::upperBound
double upperBound
Definition: minmax_types.h:132
daal::algorithms::normalization::minmax::normalizedData
Definition: minmax_types.h:111
daal::algorithms::normalization::minmax::data
Definition: minmax_types.h:100
daal::algorithms::normalization::minmax::interface1::ParameterBase::moments
services::SharedPtr< low_order_moments::BatchImpl > moments
Definition: minmax_types.h:134
daal::algorithms::math::abs::value
Definition: abs_types.h:112

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