C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 5

minmax_types.h
1 /* file: minmax_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Definition of common types of min-max normalization.
19 //--
20 */
21 
22 #ifndef __MINMAX_TYPES_H__
23 #define __MINMAX_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "data_management/data/homogen_numeric_table.h"
28 #include "algorithms/moments/low_order_moments_batch.h"
29 #include "services/daal_defines.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
44 namespace normalization
45 {
55 namespace minmax
56 {
62 enum Method
63 {
64  defaultDense = 0,
65 };
66 
72 enum InputId
73 {
74  data,
75  lastInputId = data
76 };
77 
83 enum ResultId
84 {
85  normalizedData,
86  lastResultId = normalizedData
87 };
88 
92 namespace interface1
93 {
94 
99 struct DAAL_EXPORT ParameterBase : public daal::algorithms::Parameter
100 {
101 public:
103  ParameterBase(double lowerBound, double upperBound, const services::SharedPtr<low_order_moments::BatchImpl> &momentsForParameterBase);
104 
105  double lowerBound;
106  double upperBound;
108  services::SharedPtr<low_order_moments::BatchImpl> moments;
115  virtual services::Status check() const DAAL_C11_OVERRIDE;
116 };
117 
122 template<typename algorithmFPType>
123 struct DAAL_EXPORT Parameter : public ParameterBase
124 {
125 public:
127  Parameter(double lowerBound = 0.0, double upperBound = 1.0);
128 
130  Parameter(double lowerBound, double upperBound, const services::SharedPtr<low_order_moments::BatchImpl> &momentsForParameter);
131 };
132 
137 class DAAL_EXPORT Input : public daal::algorithms::Input
138 {
139 public:
141  Input();
142 
144  Input(const Input& other);
145 
146  virtual ~Input() {}
147 
153  data_management::NumericTablePtr get(InputId id) const;
154 
160  void set(InputId id, const data_management::NumericTablePtr &ptr);
161 
169  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
170 };
171 
177 class DAAL_EXPORT Result : public daal::algorithms::Result
178 {
179 public:
180  DECLARE_SERIALIZABLE_CAST(Result);
181  Result();
182 
183  virtual ~Result() {};
184 
192  template <typename algorithmFPType>
193  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, int method);
194 
200  data_management::NumericTablePtr get(ResultId id) const;
201 
207  void set(ResultId id, const data_management::NumericTablePtr &value);
208 
217  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
218 
219 protected:
221  template<typename Archive, bool onDeserialize>
222  services::Status serialImpl(Archive *arch)
223  {
224  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
225  }
226 };
227 typedef services::SharedPtr<Result> ResultPtr;
230 } // namespace interface1
231 using interface1::ParameterBase;
232 using interface1::Parameter;
233 using interface1::Input;
234 using interface1::Result;
235 using interface1::ResultPtr;
236 
237 } // namespace minmax
238 } // namespace normalization
239 } // namespace algorithms
240 } // namespace daal
241 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::normalization::minmax::defaultDense
Definition: minmax_types.h:64
daal::algorithms::normalization::minmax::ResultId
ResultId
Definition: minmax_types.h:83
daal::algorithms::normalization::minmax::InputId
InputId
Definition: minmax_types.h:72
daal::algorithms::normalization::minmax::Method
Method
Definition: minmax_types.h:62
daal::algorithms::normalization::minmax::interface1::Parameter
Class that specifies the parameters of the algorithm in the batch computing mode. ...
Definition: minmax_types.h:123
daal::algorithms::normalization::minmax::interface1::ParameterBase
Base class that specifies the parameters of the algorithm in the batch computing mode.
Definition: minmax_types.h:99
daal::algorithms::normalization::minmax::interface1::ParameterBase::lowerBound
double lowerBound
Definition: minmax_types.h:105
daal::algorithms::normalization::minmax::interface1::Input
Input objects for the min-max normalization algorithm
Definition: minmax_types.h:137
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:177
daal::algorithms::normalization::minmax::interface1::ParameterBase::upperBound
double upperBound
Definition: minmax_types.h:106
daal::algorithms::normalization::minmax::normalizedData
Definition: minmax_types.h:85
daal::algorithms::normalization::minmax::data
Definition: minmax_types.h:74
daal::algorithms::normalization::minmax::interface1::ParameterBase::moments
services::SharedPtr< low_order_moments::BatchImpl > moments
Definition: minmax_types.h:108
daal::algorithms::math::abs::value
Definition: abs_types.h:86

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