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

objective_function_batch.h
1 /* file: objective_function_batch.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 // Implementation of the Objective function types.
19 //--
20 */
21 
22 #ifndef __OBJECTIVE_FUNCTION_BATCH_H__
23 #define __OBJECTIVE_FUNCTION_BATCH_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 "services/daal_defines.h"
29 #include "objective_function_types.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace optimization_solver
36 {
37 namespace objective_function
38 {
39 
40 namespace interface1
41 {
58 class DAAL_EXPORT Batch : public daal::algorithms::Analysis<batch>
59 {
60 public:
61  typedef algorithms::optimization_solver::objective_function::Input InputType;
62  typedef algorithms::optimization_solver::objective_function::Parameter ParameterType;
63  typedef algorithms::optimization_solver::objective_function::Result ResultType;
64 
68  Batch()
69  {
70  initialize();
71  }
72 
79  Batch(const Batch &other)
80  {
81  initialize();
82  }
83 
85  virtual ~Batch() {}
86 
91  virtual objective_function::ResultPtr getResult()
92  {
93  return _result;
94  }
95 
102  virtual services::Status setResult(const objective_function::ResultPtr& result)
103  {
104  _result = result;
105  _res = _result.get();
106  return services::Status();
107  }
108 
114  services::SharedPtr<Batch> clone() const
115  {
116  return services::SharedPtr<Batch>(cloneImpl());
117  }
118 
119 protected:
120  virtual Batch *cloneImpl() const DAAL_C11_OVERRIDE = 0;
121 
122  void initialize()
123  {
124  _result = objective_function::ResultPtr(new ResultType());
125  }
126 
127 protected:
128  objective_function::ResultPtr _result;
129 };
131 } // namespace interface1
132 using interface1::Batch;
133 
134 } // namespace objective_function
135 } // namespace optimization_solver
136 } // namespace algorithm
137 } // namespace daal
138 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::optimization_solver::objective_function::interface1::Batch
Interface for computing the Objective function in the batch processing mode.
Definition: objective_function_batch.h:58
daal::algorithms::optimization_solver::objective_function::interface1::Batch::setResult
virtual services::Status setResult(const objective_function::ResultPtr &result)
Definition: objective_function_batch.h:102
daal_defines.h
daal::algorithms::optimization_solver::objective_function::interface1::Batch::~Batch
virtual ~Batch()
Definition: objective_function_batch.h:85
daal::algorithms::optimization_solver::objective_function::interface1::Batch::Batch
Batch()
Definition: objective_function_batch.h:68
daal::algorithms::optimization_solver::objective_function::interface1::Batch::Batch
Batch(const Batch &other)
Definition: objective_function_batch.h:79
daal::algorithms::optimization_solver::objective_function::interface1::Batch::clone
services::SharedPtr< Batch > clone() const
Definition: objective_function_batch.h:114
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:68
daal::algorithms::optimization_solver::objective_function::interface1::Batch::getResult
virtual objective_function::ResultPtr getResult()
Definition: objective_function_batch.h:91

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