

Public Member Functions | |
| NonlinearObjectiveFunction (int numberOfVariables) | |
| Constructor. More... | |
| NonlinearObjectiveFunction (int numberOfVariables, std::function< Scalar(const af::array &, af::array &)> function) | |
| Creates a new objective function specified through a string. More... | |
| ~NonlinearObjectiveFunction () | |
| Destructor. More... | |
| std::function< Scalar(const af::array &, af::array &)> | GetFunction () |
| Gets the objective function. More... | |
| void | SetFunction (std::function< Scalar(const af::array &, af::array &)> func) |
| Gets the objective function. More... | |
| Scalar | Value (const af::array &x) |
| Computes function value of given x. More... | |
| af::array | Gradient (const af::array &x) |
| Gradient of given x. More... | |
| int | GetNumberOfVariables () |
| Gets the number of input variables for the function. More... | |
| void | CheckGradient (const af::array &probe) |
| Checks the gradient. More... | |
| af::array | FiniteGradient (const af::array &x, int accuracy=0) |
| Finite gradient computation. More... | |
| af::array & | LowerBound () |
| Lower bound. More... | |
| af::array & | UpperBound () |
| Upper bound. More... | |
Protected Member Functions | |
| NonlinearObjectiveFunction () | |
| Initializes a new instance of the NonlinearObjectiveFunction class. More... | |
Protected Attributes | |
| int | _numVariables |
| std::function< Scalar(const af::array &, af::array &)> | _function |
| af::array | _gradient |
| af::array | afLowerBound |
| af::array | afUpperBound |
Private Attributes | |
| af::dtype | _dtype |
Definition at line 20 of file NonlinearObjectiveFunction.h.
| NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::NonlinearObjectiveFunction | ( | int | numberOfVariables | ) |
Constructor.
Hmetal T, 11/06/2019.
| numberOfVariables | Number of variables. |
| NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::NonlinearObjectiveFunction | ( | int | numberOfVariables, |
| std::function< Scalar(const af::array &, af::array &)> | function | ||
| ) |
Creates a new objective function specified through a string.
Hmetal T, 18.03.2017.
| numberOfVariables | The number of parameters in the function . |
| function | A lambda expression defining the objective function. |
| NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::~NonlinearObjectiveFunction | ( | ) |
Destructor.
Admin, 3/21/2017.
|
protected |
Initializes a new instance of the NonlinearObjectiveFunction class.
Hmetal T, 18.03.2017.
|
virtual |
Gets the objective function.
Hmetal T, 18.03.2017.
Implements NeuralEngine::MachineLearning::IObjectiveFunction< Scalar >.
| void NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::SetFunction | ( | std::function< Scalar(const af::array &, af::array &)> | func | ) |
Gets the objective function.
Hmetal T, 18.03.2017.
| Scalar NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::Value | ( | const af::array & | x | ) |
Computes function value of given x.
Hmetal T, 10/06/2019.
| inX | [in,out] The in x coordinate. |
| af::array NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::Gradient | ( | const af::array & | x | ) |
Gradient of given x.
Hmetal T, 10/06/2019.
| x | [in,out] The af::array to process. |
|
virtual |
Gets the number of input variables for the function.
Hmetal T, 18.03.2017.
Implements NeuralEngine::MachineLearning::IObjectiveFunction< Scalar >.
| void NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::CheckGradient | ( | const af::array & | probe | ) |
Checks the gradient.
Hmetal T, 08/07/2019.
| probe | The probe. |
| af::array NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::FiniteGradient | ( | const af::array & | x, |
| int | accuracy = 0 |
||
| ) |
Finite gradient computation.
Hmetal T, 08/07/2019.
| x | The af::array to process. |
| accuracy | (Optional) the accuracycan be 0, 1, 2, 3 |
| af::array & NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::LowerBound | ( | ) |
Lower bound.
Hmetal T, 12/06/2019.
| af::array & NeuralEngine::MachineLearning::NonlinearObjectiveFunction< Scalar >::UpperBound | ( | ) |
Upper bound.
Hmetal T, 12/06/2019.
|
protected |
Definition at line 168 of file NonlinearObjectiveFunction.h.
|
protected |
Definition at line 169 of file NonlinearObjectiveFunction.h.
|
protected |
Definition at line 171 of file NonlinearObjectiveFunction.h.
|
protected |
Definition at line 173 of file NonlinearObjectiveFunction.h.
|
protected |
Definition at line 174 of file NonlinearObjectiveFunction.h.
|
private |
Definition at line 177 of file NonlinearObjectiveFunction.h.