#include <CBSolver.hxx>
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 | |
PrimalDVector & | operator= (const DVector &pd) |
assignment of a DVector | |
PrimalData * | clone_primal_data () |
produces a new PrimalDVector that is a copy of itself | |
int | assign_primal_data (const PrimalData &it) |
copy its information to *this | |
int | aggregate_primal_data (double myfactor, double itsfactor, const PrimalData &it) |
multiply *this DVector with myfactor and add itsfactor*it.primalvec |
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()