13#include <NeMachineLearningLib.h>
14#include <MachineLearning/CommonUtil.h>
18 namespace MachineLearning
41 template<
typename Scalar>
135 template<
typename TCode>
Common interface for function optimization methods.
virtual void SetSolution(af::array &x)=0
Gets a solution.
virtual af::array GetSolution()=0
Gets the current solution found, the values of the parameters which optimizes the function.
virtual bool Minimize(int *cycle=nullptr)=0
Finds the minimum value of a function. The solution vector will be made available at the Solution pro...
virtual Scalar GetValue()=0
Gets the output of the function at the current Solution.
virtual bool Maximize(int *cycle=nullptr)=0
Finds the maximum value of a function. The solution vector will be made available at the Solution pro...
virtual int GetNumberOfVariables()=0
Gets the number of variables (free parameters) in the optimization problem.
Common interface for function optimization methods.
virtual TCode GetStatus()=0
Get the exit code returned in the last call to the IOptimizationMethod.Maximize() or IOptimizationMet...