function.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_OPTIMIZERS_FUNCTION_HPP
14 #define MLPACK_CORE_OPTIMIZERS_FUNCTION_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 
18 namespace mlpack {
19 namespace optimization {
20 
21 template<typename FunctionType>
22 class Function;
23 
24 } // namespace optimization
25 } // namespace mlpack
26 
27 #include "function/traits.hpp"
35 
36 namespace mlpack {
37 namespace optimization {
38 
62 template<typename FunctionType>
63 class Function :
64  public AddDecomposableEvaluateWithGradientStatic<FunctionType>,
65  public AddDecomposableEvaluateWithGradientConst<FunctionType>,
66  public AddDecomposableEvaluateWithGradient<FunctionType>,
67  public AddDecomposableGradientStatic<FunctionType>,
68  public AddDecomposableGradientConst<FunctionType>,
69  public AddDecomposableGradient<FunctionType>,
70  public AddDecomposableEvaluateStatic<FunctionType>,
71  public AddDecomposableEvaluateConst<FunctionType>,
72  public AddDecomposableEvaluate<FunctionType>,
73  public AddEvaluateWithGradientStatic<FunctionType>,
74  public AddEvaluateWithGradientConst<FunctionType>,
75  public AddEvaluateWithGradient<FunctionType>,
76  public AddGradientStatic<FunctionType>,
77  public AddGradientConst<FunctionType>,
78  public AddGradient<FunctionType>,
79  public AddEvaluateStatic<FunctionType>,
80  public AddEvaluateConst<FunctionType>,
81  public AddEvaluate<FunctionType>,
82  public FunctionType
83 {
84  public:
85  // All of the mixin classes either reflect existing functionality or provide
86  // an unconstructable overload with the same name, so we can use using
87  // declarations here to ensure that they are all accessible. Since we don't
88  // know what FunctionType has, we can't use any using declarations there.
90  FunctionType>::EvaluateWithGradient;
92  FunctionType>::EvaluateWithGradient;
109 };
110 
111 } // namespace optimization
112 } // namespace mlpack
113 
114 #endif
The AddEvaluateWithGradient mixin class will provide an EvaluateWithGradient() method if the given Fu...
The AddDecomposableEvaluateStatic mixin class will add a decomposable static Gradient() method if a d...
The AddDecomposableGradientConst mixin class will add a decomposable const Gradient() method if a dec...
The AddEvaluateWithGradientStatic mixin class will provide a static EvaluateWithGradient() method if ...
.hpp
Definition: add_to_po.hpp:21
The AddDecomposableEvaluateWithGradient mixin class will add a decomposable EvaluateWithGradient() me...
The AddEvaluate mixin class will provide an Evaluate() method if the given FunctionType has EvaluateW...
The AddDecomposableEvaluate mixin class will add a decomposable Evaluate() method if a decomposable E...
The AddGradient mixin class will provide a const Gradient() method if the given FunctionType has Eval...
The AddGradient mixin class will provide a static Gradient() method if the given FunctionType has sta...
The core includes that mlpack expects; standard C++ includes and Armadillo.
The AddDecomposableEvaluateStatic mixin class will add a decomposable static Evaluate() method if a d...
The AddEvaluateStatic mixin class will provide a static Evaluate() method if the given FunctionType h...
The AddDecomposableGradient mixin class will add a decomposable Gradient() method if a decomposable E...
The AddDecomposableEvaluateWithGradientStatic mixin class will add a decomposable static EvaluateWith...
The AddEvaluateWithGradient mixin class will provide an EvaluateWithGradient() const method if the gi...
The AddDecomposableEvaluateWithGradientConst mixin class will add a decomposable const EvaluateWithGr...
The AddGradient mixin class will provide a Gradient() method if the given FunctionType has EvaluateWi...
The AddEvaluateConst mixin class will provide a const Evaluate() method if the given FunctionType has...
The Function class is a wrapper class for any FunctionType that will add any possible derived methods...
Definition: function.hpp:22
The AddDecomposableEvaluateConst mixin class will add a decomposable const Evaluate() method if a dec...