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

objective_function_batch.h
1 /* file: objective_function_batch.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 // Implementation of the Objective function types.
45 //--
46 */
47 
48 #ifndef __OBJECTIVE_FUNCTION_BATCH_H__
49 #define __OBJECTIVE_FUNCTION_BATCH_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 "services/daal_defines.h"
55 #include "objective_function_types.h"
56 
57 namespace daal
58 {
59 namespace algorithms
60 {
61 namespace optimization_solver
62 {
63 namespace objective_function
64 {
65 
66 namespace interface1
67 {
84 class DAAL_EXPORT Batch : public daal::algorithms::Analysis<batch>
85 {
86 public:
87  typedef algorithms::optimization_solver::objective_function::Input InputType;
88  typedef algorithms::optimization_solver::objective_function::Parameter ParameterType;
89  typedef algorithms::optimization_solver::objective_function::Result ResultType;
90 
94  Batch()
95  {
96  initialize();
97  }
98 
105  Batch(const Batch &other)
106  {
107  initialize();
108  }
109 
111  virtual ~Batch() {}
112 
117  virtual objective_function::ResultPtr getResult()
118  {
119  return _result;
120  }
121 
128  virtual services::Status setResult(const objective_function::ResultPtr& result)
129  {
130  _result = result;
131  _res = _result.get();
132  return services::Status();
133  }
134 
140  services::SharedPtr<Batch> clone() const
141  {
142  return services::SharedPtr<Batch>(cloneImpl());
143  }
144 
145 protected:
146  virtual Batch *cloneImpl() const DAAL_C11_OVERRIDE = 0;
147 
148  void initialize()
149  {
150  _result = objective_function::ResultPtr(new ResultType());
151  }
152 
153 protected:
154  objective_function::ResultPtr _result;
155 };
157 } // namespace interface1
158 using interface1::Batch;
159 
160 } // namespace objective_function
161 } // namespace optimization_solver
162 } // namespace algorithm
163 } // namespace daal
164 #endif
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::optimization_solver::objective_function::interface1::Batch
Interface for computing the Objective function in the batch processing mode.
Definition: objective_function_batch.h:84
daal::algorithms::optimization_solver::objective_function::interface1::Result
Provides methods to access final results obtained with the compute() method of the Objective function...
Definition: objective_function_types.h:186
daal::algorithms::optimization_solver::objective_function::interface1::Batch::setResult
virtual services::Status setResult(const objective_function::ResultPtr &result)
Definition: objective_function_batch.h:128
daal_defines.h
daal::algorithms::optimization_solver::objective_function::interface1::Batch::~Batch
virtual ~Batch()
Definition: objective_function_batch.h:111
daal::algorithms::optimization_solver::objective_function::interface1::Batch::Batch
Batch()
Definition: objective_function_batch.h:94
daal::algorithms::optimization_solver::objective_function::interface1::Batch::Batch
Batch(const Batch &other)
Definition: objective_function_batch.h:105
daal::algorithms::optimization_solver::objective_function::interface1::Input
Input objects for the Objective function
Definition: objective_function_types.h:146
daal::algorithms::optimization_solver::objective_function::interface1::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: objective_function_batch.h:140
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::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::algorithms::optimization_solver::objective_function::interface1::Parameter
Parameter for the Objective function
Definition: objective_function_types.h:122

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