Class mmin_constr_spg (o2scl)¶
-
template<class
func_t
= multi_funct, classdfunc_t
= grad_funct, classvec_t
= boost::numeric::ublas::vector<double>>
classo2scl
::
mmin_constr_spg
: public o2scl::mmin_constr<multi_funct, grad_funct, ool_hfunct, boost::numeric::ublas::vector<double>>¶ Constrained minimization by the spectral projected gradient method (OOL)
This class applies a non-monotone line search strategy to the classical projected gradient method.
As in [Birgin00], this class applies a nonmonotone Armijo sufficient decrease condition for accepting trial points as an improvement over the classical spectral projected gradient method. This method may be competitive with large problems because it has low memory requirements.
Default template arguments
func_t
- multi_functdfunc_t
- grad_functvec_t
- boost::numeric::ublas::vector < double >- Idea for Future:
There is some memory allocation which isn’t deallocated until the destructor, and should be handled a bit more elegantly.
Public Functions
-
mmin_constr_spg
()¶
-
~mmin_constr_spg
()¶
-
int
allocate
(const size_t n)¶ Allocate memory.
-
int
free
()¶ Free previously allocated memory.
-
int
set
(func_t &fn, dfunc_t &dfn, vec_t &init)¶ Set the function, the initial guess, and the parameters.
-
int
restart
()¶ Restart the minimizer.
-
int
iterate
()¶ Perform an iteration.
-
int
is_optimal
()¶ See if we’re finished.
-
const char *
type
()¶ Return string denoting type (“mmin_constr_spg”)
Public Members
-
double
fmin
¶ Minimum function value (default \( 10^{-99} \))
If the function value is below this value, then the algorithm assumes that the function is not bounded and exits.
-
double
tol
¶ Tolerance on infinite norm (default \( 10^{-4} \))
-
double
alphamin
¶ Lower bound to spectral step size (default \( 10^{-30} \))
-
double
alphamax
¶ Upper bound to spectral step size (default \( 10^{30} \))
-
double
gamma
¶ Sufficient decrease parameter (default \( 10^{-4} \))
-
double
sigma1
¶ Lower bound to the step length reduction (default 0.1)
-
double
sigma2
¶ Upper bound to the step length reduction (default 0.9)
-
size_t
M
¶ Monotonicity parameter (M=1 forces monotonicity) (default 10)
Protected Types
-
typedef ool_hfunct
hfunc_t
¶ A convenient typedef for the unused Hessian product type.
Protected Functions
-
int
line_search
()¶ Line search.
Protected Attributes
-
double
alpha
¶ Armijo parameter.
-
size_t
m
¶ Non-monotone parameter.
-
int
tail
¶ Desc.
Private Functions
-
mmin_constr_spg
(const mmin_constr_spg<func_t, dfunc_t, vec_t>&)¶
-
mmin_constr_spg<func_t, dfunc_t, vec_t> &
operator=
(const mmin_constr_spg<func_t, dfunc_t, vec_t>&)¶