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

minmax_types.h
1 /* file: minmax_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 common types of min-max normalization.
21 //--
22 */
23 
24 #ifndef __MINMAX_TYPES_H__
25 #define __MINMAX_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "data_management/data/homogen_numeric_table.h"
30 #include "algorithms/moments/low_order_moments_batch.h"
31 #include "services/daal_defines.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
46 namespace normalization
47 {
57 namespace minmax
58 {
64 enum Method
65 {
66  defaultDense = 0,
67 };
68 
74 enum InputId
75 {
76  data,
77  lastInputId = data
78 };
79 
85 enum ResultId
86 {
87  normalizedData,
88  lastResultId = normalizedData
89 };
90 
94 namespace interface1
95 {
96 
101 struct DAAL_EXPORT ParameterBase : public daal::algorithms::Parameter
102 {
103 public:
105  ParameterBase(double lowerBound, double upperBound, const services::SharedPtr<low_order_moments::BatchImpl> &momentsForParameterBase);
106 
107  double lowerBound;
108  double upperBound;
110  services::SharedPtr<low_order_moments::BatchImpl> moments;
117  virtual services::Status check() const DAAL_C11_OVERRIDE;
118 };
119 
124 template<typename algorithmFPType>
125 struct DAAL_EXPORT Parameter : public ParameterBase
126 {
127 public:
129  Parameter(double lowerBound = 0.0, double upperBound = 1.0);
130 
132  Parameter(double lowerBound, double upperBound, const services::SharedPtr<low_order_moments::BatchImpl> &momentsForParameter);
133 };
134 
139 class DAAL_EXPORT Input : public daal::algorithms::Input
140 {
141 public:
143  Input();
144 
146  Input(const Input& other);
147 
148  virtual ~Input() {}
149 
155  data_management::NumericTablePtr get(InputId id) const;
156 
162  void set(InputId id, const data_management::NumericTablePtr &ptr);
163 
171  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
172 };
173 
179 class DAAL_EXPORT Result : public daal::algorithms::Result
180 {
181 public:
182  DECLARE_SERIALIZABLE_CAST(Result);
183  Result();
184 
185  virtual ~Result() {};
186 
194  template <typename algorithmFPType>
195  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, int method);
196 
202  data_management::NumericTablePtr get(ResultId id) const;
203 
209  void set(ResultId id, const data_management::NumericTablePtr &value);
210 
219  services::Status check(const daal::algorithms::Input *in, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
220 
221 protected:
223  template<typename Archive, bool onDeserialize>
224  services::Status serialImpl(Archive *arch)
225  {
226  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
227  }
228 };
229 typedef services::SharedPtr<Result> ResultPtr;
232 } // namespace interface1
233 using interface1::ParameterBase;
234 using interface1::Parameter;
235 using interface1::Input;
236 using interface1::Result;
237 using interface1::ResultPtr;
238 
239 } // namespace minmax
240 } // namespace normalization
241 } // namespace algorithms
242 } // namespace daal
243 #endif
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:179
daal::algorithms::normalization::minmax::data
Definition: minmax_types.h:76
daal::algorithms::normalization::minmax::interface1::ParameterBase::upperBound
double upperBound
Definition: minmax_types.h:108
daal::algorithms::normalization::minmax::normalizedData
Definition: minmax_types.h:87
daal::algorithms::normalization::minmax::Method
Method
Definition: minmax_types.h:64
daal::algorithms::normalization::minmax::ResultId
ResultId
Definition: minmax_types.h:85
daal::algorithms::normalization::minmax::defaultDense
Definition: minmax_types.h:66
daal_defines.h
daal::algorithms::normalization::minmax::interface1::ParameterBase::moments
services::SharedPtr< low_order_moments::BatchImpl > moments
Definition: minmax_types.h:110
daal::algorithms::normalization::minmax::interface1::Parameter
Class that specifies the parameters of the algorithm in the batch computing mode. ...
Definition: minmax_types.h:125
daal::algorithms::normalization::minmax::interface1::ParameterBase
Base class that specifies the parameters of the algorithm in the batch computing mode.
Definition: minmax_types.h:101
daal::algorithms::normalization::minmax::interface1::Input
Input objects for the min-max normalization algorithm
Definition: minmax_types.h:139
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::normalization::minmax::interface1::ParameterBase::lowerBound
double lowerBound
Definition: minmax_types.h:107
daal::algorithms::normalization::minmax::InputId
InputId
Definition: minmax_types.h:74

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