Subgradient algorithm. More...
#include <subgradopt.h>
Public Member Functions | |
SubGradOpt (DualFunc &f, vector< double > lower_bound_, Param ¶m_, Pointer< ostream > out_solver_p_=out_out_p, Pointer< ostream > out_solver_log_p_=out_log_p) | |
Constructor for a function, the lower bounds and parameters. | |
int | solve (dvector &z) |
Solves the problem for a starting point. | |
int | solve () |
Solves the problem. | |
Private Attributes | |
int | LineSearch |
The type of the line search. | |
double | start_beta |
double | elasticity |
dvector | d_old |
Old direction. | |
bool | ConjGrad |
Indicates, whether to use the conjugate gradient method, or not. |
Subgradient algorithm.
Definition at line 17 of file subgradopt.h.
SubGradOpt::SubGradOpt | ( | DualFunc & | f, | |
vector< double > | lower_bound_, | |||
Param & | param_, | |||
Pointer< ostream > | out_solver_p_ = out_out_p , |
|||
Pointer< ostream > | out_solver_log_p_ = out_log_p | |||
) | [inline] |
Constructor for a function, the lower bounds and parameters.
f | The function, to optimize. | |
lower_bound_ | The lower bounds of the variables. | |
param | Some parameters. | |
out_solver_p_ | A Pointer to an ostream to print solver relevant output to. | |
out_solver_log_p | A Pointer to an ostream to print solver relevant logging output to. |
Definition at line 41 of file subgradopt.h.
int SubGradOpt::solve | ( | dvector & | x | ) | [inline, virtual] |
Solves the problem for a starting point.
Sets sol_point to x. Calls solve().
x | The dvector to start the solver with. |
Reimplemented from Solver.
Definition at line 52 of file subgradopt.h.
int SubGradOpt::solve | ( | ) | [virtual] |
Solves the problem.
Abstract.
Implements Solver.
int SubGradOpt::LineSearch [private] |
The type of the line search.
Definition at line 21 of file subgradopt.h.
double SubGradOpt::start_beta [private] |
Definition at line 23 of file subgradopt.h.
double SubGradOpt::elasticity [private] |
Definition at line 24 of file subgradopt.h.
dvector SubGradOpt::d_old [private] |
Old direction.
Definition at line 28 of file subgradopt.h.
bool SubGradOpt::ConjGrad [private] |
Indicates, whether to use the conjugate gradient method, or not.
Definition at line 31 of file subgradopt.h.