ConicBundle
Public Member Functions | List of all members
ConicBundle::PrimalDVector Class Reference

If in Lagrangean relaxation primal solutions are in the form of a ConicBundle::DVector, then an approximate primal solution can be generated by supplying primal information of this form for each epsilon subgradient within ConicBundle::FunctionOracle::evaluate(). More...

#include <CBSolver.hxx>

Inheritance diagram for ConicBundle::PrimalDVector:
ConicBundle::PrimalData

Public Member Functions

 PrimalDVector (int n)
 construct a primal double vector with n elements
 
 PrimalDVector (int n, double d)
 construct a primal double vector with n elements initialized to d
 
 PrimalDVector (const PrimalDVector &pd)
 copy constructor
 
 PrimalDVector (const DVector &pd)
 conversion from a DVector
 
PrimalDVectoroperator= (const DVector &pd)
 assignment of a DVector
 
PrimalDataclone_primal_data () const
 produces a new PrimalDVector that is a copy of itself
 
int assign_primal_data (const PrimalData &it, double factor=1.)
 copy its information to *this
 
int aggregate_primal_data (const PrimalData &it, double factor=1.)
 if it is a PrimalDVector of the same dimension, add factor*it to *this
 
virtual int scale_primal_data (double myfactor)
 multiply/scale *this with a nonnegative myfactor
 

Detailed Description

If in Lagrangean relaxation primal solutions are in the form of a ConicBundle::DVector, then an approximate primal solution can be generated by supplying primal information of this form for each epsilon subgradient within ConicBundle::FunctionOracle::evaluate().

In many applications, e.g. in Lagrangean relaxation, the convex minimization problem arises as the dual of a convex primal maximization problem. In this case one is typically interested in obtaining a primal approximate solution in addition to the dual solution. Under reasonable conditions this is possible if the primal solutions that give rise to the subgradients are aggregated along with the subgradients within the bundle algorithm. If the primal data can be represented as a DVector then the user has to supply in the oracle for each sugradient the corresponding primal data in a PrimalDvector and the algorithm will do the rest. Observe that a PrimalDVector can be used exactly in the same way as a DVector and that they are assignable among each other.

The primal data has to be supplied within ConicBundle::FunctionOracle::Evaluate() and can be retrieved via the methods ConicBundle::CBSolver::get_approximate_primal() and ConicBundle::CBSolver::get_center_primal()


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