#include <MatCBSolver.hxx>
Public Member Functions | |
PrimalMatrix () | |
empty matrix | |
PrimalMatrix (CH_Matrix_Classes::Integer nr, CH_Matrix_Classes::Integer nc) | |
generate a matrix of size nr x nc but WITHOUT initializing the memory | |
PrimalMatrix (CH_Matrix_Classes::Integer r, CH_Matrix_Classes::Integer c, CH_Matrix_Classes::Real d) | |
generate a matrix of size nr x nc initializing all elements to the value d | |
PrimalMatrix (const PrimalMatrix &pm) | |
copy constructor, *this=pm | |
PrimalMatrix (const CH_Matrix_Classes::Matrix &pm) | |
copy constructor, *this=pm | |
PrimalMatrix & | operator= (const CH_Matrix_Classes::Matrix &pd) |
copy operator, *this=pm | |
PrimalData * | clone_primal_data () |
produces a new PrimalMatrix that is a copy of itself; the caller has to delete the returned object at some point | |
int | assign_primal_data (const PrimalData &it) |
copy its information to *this (it must dynamic_cast to a PrimalMatrix) | |
int | aggregate_primal_data (double myfactor, double itsfactor, const PrimalData &it) |
multiply *this Matrix with myfactor and add itsfactor*it (it must dynamic_cast to a PrimalMatrix) |
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 CH_Matrix_Classes::Matrix then the user has to supply in the oracle for each sugradient the corresponding primal data in a PrimalMatrix and the algorithm will do the rest. Observe that a PrimalMatrix can be used exactly in the same way as a CH_Matrix_Classes::Matrix and that they are assignable among each other.
The primal data has to be supplied within ConicBundle::MatrixFunctionOracle::Evaluate() and can be retrieved via the methods ConicBundle::MatrixCBSolver::get_approximate_primal() and ConicBundle::MatrixCBSolver::get_center_primal()
ConicBundle::PrimalMatrix::PrimalMatrix | ( | CH_Matrix_Classes::Integer | nr, | |
CH_Matrix_Classes::Integer | nc | |||
) | [inline] |
generate a matrix of size nr x nc but WITHOUT initializing the memory
If initializing the memory externally and CONICBUNDLE_DEBUG is defined, please use set_init() via matrix.set_init(true) in order to avoid warnings concerning improper initialization