ConicBundle
BundleProxObject.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_BUNDLEPROXOBJECT_HXX
4 #define CONICBUNDLE_BUNDLEPROXOBJECT_HXX
5 
6 
16 #include "QPSolverObject.hxx"
17 #include "VariableMetric.hxx"
18 
19 namespace ConicBundle {
20 
21 class BundleModel;
22 class Groundset;
23 
75 
76 
77 
89 {
90 protected:
93 
96 
99 
100 public:
102  BundleProxObject(VariableMetricSelection* vp=0,bool local_scaling=false,bool bounds_scaling=false,CBout* cb=0,int cbincr=-1);
103  //:DynamicScaling(dynamic_scaling,local_scaling,bounds_scaling){}
104  //somehow inline did not work here, so I moved it to BundleProxObject.cxx
105 
107  virtual ~BundleProxObject(); //implemented in BundleScaling.cxx
108 
110  virtual void set_weightu(CH_Matrix_Classes::Real weightu)=0;
111 
114  {short_QPsteps=shortQPst;}
115 
118  {return short_QPsteps;}
119 
120 
123  {if (f<=0.) return 1; factor*=f; return 0; }
124 
127  {return factor;}
128 
130  virtual CH_Matrix_Classes::Real get_weightu() const=0;
131 
133  virtual CH_Matrix_Classes::Real get_term_corr(void) const {return 1.;}
134 
138  virtual CH_Matrix_Classes::Real dnorm_sqr(const MinorantPointer& B) const =0;
139 
141  virtual bool is_DLR() const =0;
142 
144  virtual int add_H(CH_Matrix_Classes::Symmatrix& big_sym,CH_Matrix_Classes::Integer start_index=0) const=0;
145 
148  CH_Matrix_Classes::Matrix& outplusHx,
149  CH_Matrix_Classes::Real alpha=1.) const =0;
150 
158 
165  virtual void get_precond(CH_Matrix_Classes::Matrix& D,
166  const CH_Matrix_Classes::Matrix*& Vp) const=0;
167 
254  CH_Matrix_Classes::Real& offset,
255  const MinorantPointer& constant_minorant,
256  const MinorantBundle& bundle,
257  const CH_Matrix_Classes::Matrix& center_y,
258  const MinorantPointer& groundset_minorant,
259  CH_Matrix_Classes::Indexmatrix* yfixed) =0;
260 
261 
262 
316  virtual int update_QP_costs(CH_Matrix_Classes::Symmatrix& delta_Q,
317  CH_Matrix_Classes::Matrix& delta_d,
318  CH_Matrix_Classes::Real& delta_offset,
319  const MinorantPointer& constant_minorant,
320  const MinorantBundle& bundle,
321  const CH_Matrix_Classes::Matrix& center_y,
322  const MinorantPointer& groundset_minorant,
323  const MinorantPointer& delta_groundset_minorant,
324  const CH_Matrix_Classes::Indexmatrix& delta_index,
325  CH_Matrix_Classes::Indexmatrix* yfixed) =0;
326 
331  virtual int apply_modification(const GroundsetModification& gsmdf)=0;
332 
336 
337 };
338 
339 
341 
342 }
343 
344 #endif
345 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
virtual void set_short_QPsteps(CH_Matrix_Classes::Integer shortQPst)
may be used to indicate seemingly conservative step sizes possibly due to the quadratic term ...
Definition: BundleProxObject.hxx:113
virtual CH_Matrix_Classes::Real get_term_corr(void) const
return a correction factor for termination precision if the quadratic term is strong ...
Definition: BundleProxObject.hxx:133
abstract interface that allows to use different -norms with a positive definite matrix in the proxi...
Definition: BundleProxObject.hxx:88
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual void set_weightu(CH_Matrix_Classes::Real weightu)=0
in future computations the following weight must be included in the quadratic term (replacing the pre...
CH_Matrix_Classes::Real factor
used to accumulate a compensation factor for function_factor; this factor is not included in H but ca...
Definition: BundleProxObject.hxx:95
virtual CH_Matrix_Classes::Matrix & add_Hx(const CH_Matrix_Classes::Matrix &x, CH_Matrix_Classes::Matrix &outplusHx, CH_Matrix_Classes::Real alpha=1.) const =0
add to outplusHx and return this
BundleProxObject(VariableMetricSelection *vp=0, bool local_scaling=false, bool bounds_scaling=false, CBout *cb=0, int cbincr=-1)
default constructor, switching on dynamic scaling only works for classes with corresponding support ...
static const CH_Matrix_Classes::Integer xdim_threshold
constant for possible use if QP coefficients are to be computed in parallel (still purely experimenta...
Definition: BundleProxObject.hxx:92
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
CH_Matrix_Classes::Real get_factor()
returns the current accumulated compensation factor by which H would need to be scaled in order to re...
Definition: BundleProxObject.hxx:126
virtual int compute_QP_costs(CH_Matrix_Classes::Symmatrix &Q, CH_Matrix_Classes::Matrix &d, CH_Matrix_Classes::Real &offset, const MinorantPointer &constant_minorant, const MinorantBundle &bundle, const CH_Matrix_Classes::Matrix &center_y, const MinorantPointer &groundset_minorant, CH_Matrix_Classes::Indexmatrix *yfixed)=0
Compute the dual QP costs Q, d, and the constant offset to the bundle subproblem. ...
virtual CH_Matrix_Classes::Matrix & apply_Hinv(CH_Matrix_Classes::Matrix &x) const =0
returns , possibly transformed by some AffineFunctionTransformation
Header declaring the abstract class ConicBundle::QPSolverObject.
Matrix class of symmetric matrices with real values of type Real
Definition: symmat.hxx:43
virtual CH_Matrix_Classes::Integer get_short_QPsteps()
retrieves the number of conservative step sizes possibly due to the quadratic term passed on to this ...
Definition: BundleProxObject.hxx:117
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
virtual void get_precond(CH_Matrix_Classes::Matrix &D, const CH_Matrix_Classes::Matrix *&Vp) const =0
return which either equals $H$ exactly (iff is_DLR() returns true) or, if not, serves as an approxim...
int apply_factor(CH_Matrix_Classes::Real f)
allows AFTModel and SumModel to accumulate a compensation factor for tracing the effects of recursive...
Definition: BundleProxObject.hxx:122
virtual int update_QP_costs(CH_Matrix_Classes::Symmatrix &delta_Q, CH_Matrix_Classes::Matrix &delta_d, CH_Matrix_Classes::Real &delta_offset, const MinorantPointer &constant_minorant, const MinorantBundle &bundle, const CH_Matrix_Classes::Matrix &center_y, const MinorantPointer &groundset_minorant, const MinorantPointer &delta_groundset_minorant, const CH_Matrix_Classes::Indexmatrix &delta_index, CH_Matrix_Classes::Indexmatrix *yfixed)=0
computes the update of the dual QP cost terms d and offset returned by compute_QP_costs() for changes...
Header declaring the classes ConicBundle::VariableMetricModel, ConicBundle::VariableMetricBundleData...
CH_Matrix_Classes::Integer short_QPsteps
the QP may signal short steps that seem due to the quadratic term by setting this counter via set_sho...
Definition: BundleProxObject.hxx:98
interface class that allows a VariableMetricModel to contribute information to a VariableMetric objec...
Definition: VariableMetric.hxx:309
virtual int apply_modification(const GroundsetModification &gsmdf)=0
if the BundleSolver is called to modify the groundset it also calls this
virtual bool is_DLR() const =0
return true if H is of the form diagonal matrix plus Gram matrix of a low rank matrix ...
Matrix class for real values of type Real
Definition: matrix.hxx:74
abstract interface, that allows to specify a routine for providing or computing a suitable variable m...
Definition: VariableMetric.hxx:237
virtual CH_Matrix_Classes::Real norm_sqr(const CH_Matrix_Classes::Matrix &B) const =0
return
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
virtual CH_Matrix_Classes::Real get_weightu() const =0
return the current weight incorporated in the quadratic term
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
virtual CH_Matrix_Classes::Real dnorm_sqr(const MinorantPointer &B) const =0
return
virtual BundleProxObject * projected_clone(const CH_Matrix_Classes::Indexmatrix &indices)=0
in order to allow for fixed variables, this generates a clone restricted to the given indices ...
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
virtual int add_H(CH_Matrix_Classes::Symmatrix &big_sym, CH_Matrix_Classes::Integer start_index=0) const =0
add H to the dense symmetric matrix as a principal submatrix starting at position start_index ...
in order to pass a ConicBundle::BundleProxObject, see Quadratic Proximal Terms, to a custzomized QPSo...
Definition: QPSolverObject.hxx:55
Header declaring the classes ConicBundle::AffineFunctionTransformation.