ConicBundle
Groundset.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_GROUNDSET_HXX
4 #define CONICBUNDLE_GROUNDSET_HXX
5 
6 
14 #include "BundleProxObject.hxx"
15 #include "QPSolverObject.hxx"
16 //#include "clock.hxx"
17 
18 namespace ConicBundle {
19 
50 
77  class Groundset:virtual public VariableMetricModel
78 {
79 
80 public:
91  virtual void clear( CH_Matrix_Classes::Integer indim=0, CH_Matrix_Classes::Integer in_groundset_id=0) =0;
92 
94  virtual ~Groundset();
95 
98 
100  virtual void set_groundset_id(CH_Matrix_Classes::Integer gsid) =0;
101 
103  virtual CH_Matrix_Classes::Integer get_dim() const =0;
104 
109  virtual bool constrained() const =0;
110 
123  virtual bool is_feasible(CH_Matrix_Classes::Integer& in_groundset_id,
124  const CH_Matrix_Classes::Matrix& y,
125  CH_Matrix_Classes::Real relprec=1e-10)=0;
126 
150  virtual int ensure_feasibility(CH_Matrix_Classes::Integer& in_groundset_id,
152  bool& ychanged,
153  BundleProxObject* Hp=0,
154  CH_Matrix_Classes::Real relprec=1e-10)=0;
155 
157  virtual QPSolverObject* get_qp_solver(bool& solves_model_without_gs,
158  BundleProxObject* Hp) =0;
159 
161  virtual int set_qp_solver_parameters(QPSolverParametersObject* in_qpsp) =0;
162 
164  virtual const CH_Matrix_Classes::Matrix& get_starting_point() const =0;
165 
167  virtual int set_starting_point(const CH_Matrix_Classes::Matrix& vec)=0;
168 
265  virtual int candidate(CH_Matrix_Classes::Integer& gs_id,
267  CH_Matrix_Classes::Real& cand_gs_val,
268  CH_Matrix_Classes::Real& linval,
269  CH_Matrix_Classes::Real& augval_lb,
270  CH_Matrix_Classes::Real& augval_ub,
271  CH_Matrix_Classes::Real& subgnorm2,
272  const CH_Matrix_Classes::Matrix& center_y,
273  CH_Matrix_Classes::Real center_value,
274  const MinorantPointer& model_minorant,
275  BundleProxObject* Hp,
276  MinorantPointer* delta_groundset_minorant=0,
277  CH_Matrix_Classes::Indexmatrix* delta_index=0,
278  CH_Matrix_Classes::Real relprec=1e-2)=0;
279 
281  virtual const MinorantPointer& get_gs_aggregate() const =0;
282 
284  virtual const MinorantPointer& get_gs_minorant() const =0;
285 
287  virtual const CH_Matrix_Classes::Indexmatrix* get_yfixed() const =0;
288 
291 
293  virtual bool get_use_yfixing() const =0;
294 
296  virtual void set_use_yfixing(bool uyf) =0;
297 
300 
302  virtual int apply_modification(const GroundsetModification& mdf) =0;
303 
305  virtual int mfile_data(std::ostream& out) const =0;
306 
307 };
308 
309 
310 
312 
313 }
314 
315 #endif
316 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
abstract interface for a QPSolver
Definition: QPSolverObject.hxx:105
abstract interface that allows to use different -norms with a positive definite matrix in the proxi...
Definition: BundleProxObject.hxx:88
virtual int candidate(CH_Matrix_Classes::Integer &gs_id, CH_Matrix_Classes::Matrix &newy, CH_Matrix_Classes::Real &cand_gs_val, CH_Matrix_Classes::Real &linval, CH_Matrix_Classes::Real &augval_lb, CH_Matrix_Classes::Real &augval_ub, CH_Matrix_Classes::Real &subgnorm2, const CH_Matrix_Classes::Matrix &center_y, CH_Matrix_Classes::Real center_value, const MinorantPointer &model_minorant, BundleProxObject *Hp, MinorantPointer *delta_groundset_minorant=0, CH_Matrix_Classes::Indexmatrix *delta_index=0, CH_Matrix_Classes::Real relprec=1e-2)=0
for a given model aggregate compute the groundset aggregate and the resulting (feasible) candidate ...
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual const CH_Matrix_Classes::Indexmatrix * get_yfixed() const =0
if not NULL (iff get_use_yfixing()==false) it returns the vector yfixed with yfixed(i)=0 if not fixed...
virtual int mfile_data(std::ostream &out) const =0
m-file output routine for debugging or testing in Matlab (not yet working)
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
virtual CH_Matrix_Classes::Integer get_groundset_id() const =0
returns the current groundset_id, increased values indicate changes in the ground set ...
virtual int apply_modification(const GroundsetModification &mdf)=0
change the groundset description as specified by the argument
Header declaring the abstract class ConicBundle::QPSolverObject.
Header declaring the class ConicBundle::BundleProxObject.
virtual const MinorantPointer & get_gs_minorant() const =0
returns the linear minorant valid on the entire ground set (e.g. a linear cost funciton) ...
virtual CH_Matrix_Classes::Integer get_dim() const =0
returns the dimension of the ground set, i.e., the length of the variables vector y ...
virtual void set_groundset_id(CH_Matrix_Classes::Integer gsid)=0
sets the groundset_id to the desired value, increasing it is safer here because this is used to indic...
virtual GroundsetModification * start_modification()=0
return a new modification object on the heap that is initialized for modification of *this ...
in order to pass parameters to a customized QPSolverObject, derive the parameters from this object; n...
Definition: QPSolverObject.hxx:46
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
declares the interface that a BundelModel needs to provide for contributing to VariableMetric informa...
Definition: VariableMetric.hxx:111
virtual bool get_use_yfixing() const =0
true if the cooridinate fixing heuristic is switched on (only constrained cases)
virtual int set_starting_point(const CH_Matrix_Classes::Matrix &vec)=0
stores the a new starting point irrespective of whether it is feasible or not and returns 0 if it fea...
abstract representation of the feasible convex ground set to be optimized over, provides the QP solve...
Definition: Groundset.hxx:77
virtual int set_qp_solver_parameters(QPSolverParametersObject *in_qpsp)=0
set parameters for the QP_Solver
virtual bool is_feasible(CH_Matrix_Classes::Integer &in_groundset_id, const CH_Matrix_Classes::Matrix &y, CH_Matrix_Classes::Real relprec=1e-10)=0
on input value in_groundset_id the input y was feasible. Return true if the id did not change...
Matrix class for real values of type Real
Definition: matrix.hxx:74
virtual const MinorantPointer & get_gs_aggregate() const =0
returns the groundset aggregate computed in candidate()
std::ostream * out
not output at all if out==0, otherwise use this output stream
Definition: CBout.hxx:33
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
virtual void set_use_yfixing(bool uyf)=0
set to true to switch on the cooridinate fixing heuristic (only constrained cases) ...
virtual CH_Matrix_Classes::Indexmatrix * set_yfixed()=0
if not NULL (iff get_use_yfixing()==false) returns the vector yfixed with yfixed(i)=0 if not fixed...
virtual bool constrained() const =0
returns false if the feasible set is the entire space (unconstrained optimization), true otherwise.
virtual void clear(CH_Matrix_Classes::Integer indim=0, CH_Matrix_Classes::Integer in_groundset_id=0)=0
reset everything to initial state for an unconstrained ground set of dimension indim ...
virtual int ensure_feasibility(CH_Matrix_Classes::Integer &in_groundset_id, CH_Matrix_Classes::Matrix &y, bool &ychanged, BundleProxObject *Hp=0, CH_Matrix_Classes::Real relprec=1e-10)=0
if the groundset_id changed, it checks feasibility of y with respect to the given precision...
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
virtual const CH_Matrix_Classes::Matrix & get_starting_point() const =0
returns a stored starting point, note: this need not be feasible; if generated automatically, its dimension is correct.
virtual QPSolverObject * get_qp_solver(bool &solves_model_without_gs, BundleProxObject *Hp)=0
returns a pointer to an internal QPSolverObject that is able to solve bundle suproblems efficiently f...