ConicBundle
BundleWeight.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_BUNDLEWEIGHT_HXX
4 #define CONICBUNDLE_BUNDLEWEIGHT_HXX
5 
6 
15 #include "matrix.hxx"
16 #include "clock.hxx"
17 #include "CBSolver.hxx"
18 #include "MinorantPointer.hxx"
19 #include "Groundset.hxx"
20 #include "BundleModel.hxx"
21 
22 namespace ConicBundle {
23 
28 
29 
35 class BundleWeight : public CBout
36 {
37 public:
39  BundleWeight(const CBout* cb=0,int incr=-1):CBout(cb,incr){}
40 
42  virtual ~BundleWeight(); //implemented in hk
43 
45  virtual void set_defaults()=0;
46 
48  virtual void clear()=0;
49 
65  virtual int init(CH_Matrix_Classes::Real aggr_dnormsqr,
66  Groundset* groundset,BundleModel* model)=0;
67 
76  virtual void set_next_weight(CH_Matrix_Classes::Real u)=0;
77 
81  virtual void set_minweight(CH_Matrix_Classes::Real umin) =0;
82 
84  virtual CH_Matrix_Classes::Real get_minweight() const =0;
85 
89  virtual void set_maxweight(CH_Matrix_Classes::Real umax) =0;
90 
92  virtual CH_Matrix_Classes::Real get_maxweight() const =0;
93 
95  virtual CH_Matrix_Classes::Real get_weight() const =0;
96 
98  virtual bool get_next_weight_set() const =0;
99 
104  virtual bool weight_changed() const =0;
105 
134  virtual int descent_update(CH_Matrix_Classes::Real newval,
136  CH_Matrix_Classes::Real modelval,
137  const CH_Matrix_Classes::Matrix& y,
138  const CH_Matrix_Classes::Matrix& newy,
139  CH_Matrix_Classes::Real aggr_dnormsqr,
140  BundleProxObject* Hp)=0;
141 
179  virtual int nullstep_update(CH_Matrix_Classes::Real newval,
181  CH_Matrix_Classes::Real modelval,
182  const CH_Matrix_Classes::Matrix& y,
183  const CH_Matrix_Classes::Matrix& newy,
184  MinorantPointer& new_minorant,
185  MinorantPointer& aggregate,
186  CH_Matrix_Classes::Real nullstep_bound,
187  CH_Matrix_Classes::Real aggr_dnormsqr,
188  BundleProxObject* Hp)=0;
189 
190 
195  virtual int apply_modification(const GroundsetModification& gsmdf)=0;
196 
197 };
198 
200 
201 }
202 
203 #endif
204 
virtual int descent_update(CH_Matrix_Classes::Real newval, CH_Matrix_Classes::Real oldval, CH_Matrix_Classes::Real modelval, const CH_Matrix_Classes::Matrix &y, const CH_Matrix_Classes::Matrix &newy, CH_Matrix_Classes::Real aggr_dnormsqr, BundleProxObject *Hp)=0
The BundleSolver calls this for computing the next weight if the candidate will result in a descent s...
Header declaring the classes CH_Matrix_Classes::Realrange and CH_Matrix_Classes::Matrix having Real e...
abstract interface that allows to use different -norms with a positive definite matrix in the proxi...
Definition: BundleProxObject.hxx:88
virtual int apply_modification(const GroundsetModification &gsmdf)=0
if the BundleSolver is called to modify the groundset it also calls this
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual void set_next_weight(CH_Matrix_Classes::Real u)=0
Allows the user to set the weight of the very next iteration of the bundle method.
virtual int nullstep_update(CH_Matrix_Classes::Real newval, CH_Matrix_Classes::Real oldval, CH_Matrix_Classes::Real modelval, const CH_Matrix_Classes::Matrix &y, const CH_Matrix_Classes::Matrix &newy, MinorantPointer &new_minorant, MinorantPointer &aggregate, CH_Matrix_Classes::Real nullstep_bound, CH_Matrix_Classes::Real aggr_dnormsqr, BundleProxObject *Hp)=0
The BundleSolver calls this for computing the next weight if if the candidate will result in a null s...
virtual bool get_next_weight_set() const =0
returns true if the current weight has been set externally by the user
virtual CH_Matrix_Classes::Real get_weight() const =0
Returns the current value of the weight.
virtual int init(CH_Matrix_Classes::Real aggr_dnormsqr, Groundset *groundset, BundleModel *model)=0
Compute the first weight u and set some parameters,.
virtual bool weight_changed() const =0
Returns false only if the last call to descent_update() or nullstep_update() did not modify the weigh...
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
Header declaring the classes ConicBundle::CBSolver, ConicBundle::FunctionOracle and ConicBundle::Prim...
abstract representation of the feasible convex ground set to be optimized over, provides the QP solve...
Definition: Groundset.hxx:77
virtual void set_minweight(CH_Matrix_Classes::Real umin)=0
Sets a lower bound for the weight. Nonpositive values may be used to indicate that the weight is allo...
Matrix class for real values of type Real
Definition: matrix.hxx:74
abstract interface for BundleSolver giving access to all objective function specific bundle routines ...
Definition: BundleModel.hxx:140
virtual CH_Matrix_Classes::Real get_maxweight() const =0
Returns the current value of the maxweight.
Abstract interface for BundleSolver providing routines that determine the weight of the quadratic ter...
Definition: BundleWeight.hxx:35
virtual CH_Matrix_Classes::Real get_minweight() const =0
Returns the current value of the minweight.
virtual void clear()=0
Resets all adaptive variables and parameters.
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
Header declaring and (inline) implementing the classes CH_Tools::Microseconds and CH_Tools::Clock as ...
virtual void set_maxweight(CH_Matrix_Classes::Real umax)=0
Sets an upper bound for the weight. Nonpositive values may be used to indicate that the weight is all...
Header declaring the class ConicBundle::MinorantPointer.
BundleWeight(const CBout *cb=0, int incr=-1)
default constructor with the possibility to set the output
Definition: BundleWeight.hxx:39
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
Header declaring the class ConicBundle::BundleModel.
virtual void set_defaults()=0
Sets default values for 'constant' parameters, e.g. minweight and maxweight.
Header declaring the class ConicBundle::Groundset.