A abstract base class for a dual function of a MinlpReform. More...
#include <dualqqp.h>
Public Member Functions | |
DualFunc (MinlpProblem &qqp_, Param ¶m_, Pointer< ostream > out_func_p_=out_out_p, Pointer< ostream > out_func_log_p_=out_log_p) | |
Constructor for a MinlpReform. | |
int | primal_dim () const |
The dimension of the MINLP-problem, not the dual one. | |
virtual dvector | get_dual_point () const =0 |
Gives the last dual point. | |
virtual double | get_dual_val () const =0 |
Gives the last dual value. | |
virtual dvector | get_orig_point (int i=0) const =0 |
Gives the last solution point of the original problem. | |
virtual int | nr_of_orig_points () const |
The number of points, you can get with get_orig_point(). | |
virtual void | set_curvature (CurvatureType ct) |
virtual CurvatureType | get_curvature () const |
Public Attributes | |
MinlpProblem & | qqp |
The MINLP problem. | |
vector< double > | dual_bounds |
The lower bounds of the dual variables. | |
Param & | param |
The parameters of the Minlp-solver. |
A abstract base class for a dual function of a MinlpReform.
The dimension should be the one form the dual problem. You can get the dimension of the primal problem with primal_dim().
In addition to the methods from Func, you need to implement:
Definition at line 25 of file dualqqp.h.
DualFunc::DualFunc | ( | MinlpProblem & | qqp_, | |
Param & | param_, | |||
Pointer< ostream > | out_func_p_ = out_out_p , |
|||
Pointer< ostream > | out_func_log_p_ = out_log_p | |||
) | [inline] |
Constructor for a MinlpReform.
The dual dimension is set to 0 at this moment and should be set by a derived class.
int DualFunc::primal_dim | ( | ) | const [inline] |
virtual dvector DualFunc::get_dual_point | ( | ) | const [pure virtual] |
Gives the last dual point.
Implemented in QqpDualFunc.
virtual double DualFunc::get_dual_val | ( | ) | const [pure virtual] |
Gives the last dual value.
Implemented in QqpDualFunc.
virtual dvector DualFunc::get_orig_point | ( | int | i = 0 |
) | const [pure virtual] |
Gives the last solution point of the original problem.
In some dual functions, you can get more than one point.
i | The number of this point to get. 0 should give you the best one. |
Implemented in QqpDualFunc.
virtual int DualFunc::nr_of_orig_points | ( | ) | const [inline, virtual] |
virtual void DualFunc::set_curvature | ( | CurvatureType | ct | ) | [inline, virtual] |
virtual CurvatureType DualFunc::get_curvature | ( | ) | const [inline, virtual] |
vector<double> DualFunc::dual_bounds |