DualFunc Class Reference

A abstract base class for a dual function of a MinlpReform. More...

#include <dualqqp.h>

Inheritance diagram for DualFunc:
Inheritance graph
[legend]
Collaboration diagram for DualFunc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DualFunc (MinlpProblem &qqp_, Param &param_, 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

MinlpProblemqqp
 The MINLP problem.
vector< double > dual_bounds
 The lower bounds of the dual variables.
Paramparam
 The parameters of the Minlp-solver.

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
qqp_ The MinlpReform, this function belongs to.
param_ Some parameters.
out_func_p_ Pointer to an ostream to print function-related stuff to.
out_func_log_p_ Pointer to an ostream to print function-related logging-stuff to.

Definition at line 47 of file dualqqp.h.


Member Function Documentation

int DualFunc::primal_dim (  )  const [inline]

The dimension of the MINLP-problem, not the dual one.

Returns:
The dimension of the primal problem.

Definition at line 54 of file dualqqp.h.

virtual dvector DualFunc::get_dual_point (  )  const [pure virtual]

Gives the last dual point.

Returns:
The last dual point, which was used to evaluate this function.

Implemented in QqpDualFunc.

virtual double DualFunc::get_dual_val (  )  const [pure virtual]

Gives the last dual value.

Returns:
The last dual value, which was calculated with this function.

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.

Parameters:
i The number of this point to get. 0 should give you the best one.
Returns:
The last solution point of the given problem.
See also:
get_orig_point(int)

Implemented in QqpDualFunc.

virtual int DualFunc::nr_of_orig_points (  )  const [inline, virtual]

The number of points, you can get with get_orig_point().

Returns:
1.

Reimplemented in QqpDualFunc.

Definition at line 77 of file dualqqp.h.

virtual void DualFunc::set_curvature ( CurvatureType  ct  )  [inline, virtual]

Implements Func.

Definition at line 79 of file dualqqp.h.

virtual CurvatureType DualFunc::get_curvature (  )  const [inline, virtual]

Implements Func.

Definition at line 80 of file dualqqp.h.


Member Data Documentation

The MINLP problem.

Definition at line 29 of file dualqqp.h.

vector<double> DualFunc::dual_bounds

The lower bounds of the dual variables.

Should be set in a derived class.

Definition at line 34 of file dualqqp.h.

The parameters of the Minlp-solver.

Definition at line 38 of file dualqqp.h.


The documentation for this class was generated from the following file:

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1