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

objective_function_batch.h
1 /* file: objective_function_batch.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 // 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:
90  Batch()
91  {
92  initialize();
93  }
94 
101  Batch(const Batch &other)
102  {
103  initialize();
104  }
105 
107  virtual ~Batch() {}
108 
113  virtual objective_function::ResultPtr getResult()
114  {
115  return _result;
116  }
117 
124  virtual services::Status setResult(const objective_function::ResultPtr& result)
125  {
126  _result = result;
127  _res = _result.get();
128  return services::Status();
129  }
130 
136  services::SharedPtr<Batch> clone() const
137  {
138  return services::SharedPtr<Batch>(cloneImpl());
139  }
140 
141 protected:
142  virtual Batch *cloneImpl() const DAAL_C11_OVERRIDE = 0;
143 
144  void initialize()
145  {
146  _result = objective_function::ResultPtr(new objective_function::Result());
147  }
148 
149 protected:
150  objective_function::ResultPtr _result;
151 };
153 } // namespace interface1
154 using interface1::Batch;
155 
156 } // namespace objective_function
157 } // namespace optimization_solver
158 } // namespace algorithm
159 } // namespace daal
160 #endif
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::Batch::setResult
virtual services::Status setResult(const objective_function::ResultPtr &result)
Definition: objective_function_batch.h:124
daal_defines.h
daal::algorithms::optimization_solver::objective_function::interface1::Batch::~Batch
virtual ~Batch()
Definition: objective_function_batch.h:107
daal::algorithms::optimization_solver::objective_function::interface1::Batch::Batch
Batch()
Definition: objective_function_batch.h:90
daal::algorithms::optimization_solver::objective_function::interface1::Batch::Batch
Batch(const Batch &other)
Definition: objective_function_batch.h:101
daal::algorithms::optimization_solver::objective_function::interface1::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: objective_function_batch.h:136
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::Batch::getResult
virtual objective_function::ResultPtr getResult()
Definition: objective_function_batch.h:113

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