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

sum_of_functions_types.h
1 /* file: sum_of_functions_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 // Implementation of the Sum of functions interface.
21 //--
22 */
23 
24 #ifndef __SUM_OF_FUNCTIONS_TYPES_H__
25 #define __SUM_OF_FUNCTIONS_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "services/daal_defines.h"
30 #include "objective_function_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace optimization_solver
37 {
47 namespace sum_of_functions
48 {
49 
54 enum InputId
55 {
56  argument = (int)objective_function::argument,
57 };
58 
62 namespace interface1
63 {
70 /* [interface1::Parameter source code] */
71 struct DAAL_EXPORT Parameter : public objective_function::Parameter
72 {
82  Parameter(size_t numberOfTerms,
83  data_management::NumericTablePtr batchIndices = data_management::NumericTablePtr(),
84  const DAAL_UINT64 resultsToCompute = objective_function::gradient);
85 
90  Parameter(const Parameter &other);
91 
97  virtual services::Status check() const;
98 
99  virtual ~Parameter() {}
100 
101  size_t numberOfTerms;
102  data_management::NumericTablePtr batchIndices;
106 };
107 /* [interface1::Parameter source code] */
108 
113 class DAAL_EXPORT Input : public objective_function::Input
114 {
115 public:
117  Input(size_t n = 1);
118 
120  Input(const Input& other);
121 
123  virtual ~Input() {}
124 
130  void set(InputId id, const data_management::NumericTablePtr &ptr);
131 
137  data_management::NumericTablePtr get(InputId id) const;
138 
146  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
147 };
149 } // namespace interface1
150 
151 namespace interface2
152 {
159 /* [Parameter source code] */
160 struct DAAL_EXPORT Parameter : public objective_function::Parameter
161 {
171  Parameter(size_t numberOfTerms,
172  data_management::NumericTablePtr batchIndices = data_management::NumericTablePtr(),
173  const DAAL_UINT64 resultsToCompute = objective_function::gradient);
174 
179  Parameter(const Parameter &other);
180 
186  virtual services::Status check() const;
187 
188  virtual ~Parameter() {}
189 
190  size_t numberOfTerms;
191  data_management::NumericTablePtr batchIndices;
195  size_t featureId;
196 };
197 /* [Parameter source code] */
198 
203 class DAAL_EXPORT Input : public objective_function::Input
204 {
205 public:
207  Input(size_t n = 1);
208 
210  Input(const Input& other);
211 
213  virtual ~Input() {}
214 
220  void set(InputId id, const data_management::NumericTablePtr &ptr);
221 
227  data_management::NumericTablePtr get(InputId id) const;
228 
236  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
237 };
238 
239 }
240 
241 using interface2::Parameter;
242 using interface2::Input;
243 
244 } // namespace sum_of_functions
245 } // namespace optimization_solver
246 } // namespace algorithm
247 } // namespace daal
248 #endif
daal::algorithms::optimization_solver::sum_of_functions::interface2::Parameter::batchIndices
data_management::NumericTablePtr batchIndices
Definition: sum_of_functions_types.h:191
daal::algorithms::optimization_solver::sum_of_functions::interface1::Input::~Input
virtual ~Input()
Definition: sum_of_functions_types.h:123
daal::algorithms::optimization_solver::sum_of_functions::interface1::Input
Input objects for the Sum of functions
Definition: sum_of_functions_types.h:113
daal::algorithms::optimization_solver::sum_of_functions::interface2::Input
Input objects for the Sum of functions
Definition: sum_of_functions_types.h:203
daal::algorithms::optimization_solver::sum_of_functions::InputId
InputId
Definition: sum_of_functions_types.h:54
daal::algorithms::optimization_solver::sum_of_functions::interface1::Parameter
Parameter for the Sum of functions
Definition: sum_of_functions_types.h:71
daal::algorithms::optimization_solver::sum_of_functions::interface2::Parameter
Parameter for the Sum of functions
Definition: sum_of_functions_types.h:160
daal_defines.h
daal::algorithms::optimization_solver::sum_of_functions::interface2::Input::~Input
virtual ~Input()
Definition: sum_of_functions_types.h:213
daal::algorithms::optimization_solver::sum_of_functions::interface1::Parameter::numberOfTerms
size_t numberOfTerms
Definition: sum_of_functions_types.h:101
daal::algorithms::optimization_solver::sum_of_functions::argument
Definition: sum_of_functions_types.h:56
daal::algorithms::optimization_solver::objective_function::argument
Definition: objective_function_types.h:59
daal::algorithms::optimization_solver::objective_function::gradient
Definition: objective_function_types.h:69
daal::algorithms::optimization_solver::sum_of_functions::interface2::Parameter::numberOfTerms
size_t numberOfTerms
Definition: sum_of_functions_types.h:190
daal::algorithms::optimization_solver::sum_of_functions::interface2::Parameter::featureId
size_t featureId
Definition: sum_of_functions_types.h:195
daal::algorithms::optimization_solver::sum_of_functions::interface1::Parameter::batchIndices
data_management::NumericTablePtr batchIndices
Definition: sum_of_functions_types.h:102

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