ConicBundle
BundleRQBWeight.hxx
1 
2 
3 #ifndef CONICBUNDLE_BUNDLERQBWEIGHT_HXX
4 #define CONICBUNDLE_BUNDLERQBWEIGHT_HXX
5 
6 #include "BundleWeight.hxx"
7 
8 namespace ConicBundle {
9 
14 
15 
25 {
30 
33 
36 
46 
49 
50 public:
53  const CBout* cbo=0,
54  int incr=-1);
55 
60  CH_Matrix_Classes::Real eta=1e-6,
61  BundleWeight* bwp=0,
62  const CBout* cbo=0,
63  int incr=-1);
65  ~BundleRQBWeight(){}
66 
67 
69  virtual void set_defaults();
70 
72  virtual void clear();
73 
74 
76  int init(CH_Matrix_Classes::Real aggr_dnmormsqr,Groundset* groundset,BundleModel* model);
77 
80  { if (u<=0.) return;
81  weight=CH_Matrix_Classes::max(u,1e-10); weightchanged=true;next_weight_set=true;}
82 
85  {
86  minweight=mw;
87  if (minweight>0){
88  if ((weight>0)&&(weight<minweight))
89  weight=minweight;
90  if ((maxweight>0)&&(maxweight<minweight))
91  maxweight=minweight;
92  }
93  }
94 
96  bool get_next_weight_set() const {return next_weight_set;}
97 
100 
103  {
104  maxweight=mw;
105  if (maxweight>0){
106  if (weight>maxweight){
107  weight=maxweight;
108  }
109  if ((minweight>0)&&(minweight>maxweight))
110  minweight=maxweight;
111  }
112  }
113 
116 
119 
121  bool weight_changed() const;
122 
126  CH_Matrix_Classes::Real modelval,
127  const CH_Matrix_Classes::Matrix& y,
128  const CH_Matrix_Classes::Matrix& newy,
129  CH_Matrix_Classes::Real normsubg2,
130  BundleProxObject* Hp);
131 
135  CH_Matrix_Classes::Real modelval,
136  const CH_Matrix_Classes::Matrix& y,
137  const CH_Matrix_Classes::Matrix& newy,
138  MinorantPointer& new_minorant,
139  MinorantPointer& aggregate,
140  CH_Matrix_Classes::Real nullstep_bound,
141  CH_Matrix_Classes::Real normsubg2,
142  BundleProxObject *Hp);
143 
145  virtual int apply_modification(const GroundsetModification& gsmdf);
146 
147 };
148 
149 }
150 
151 #endif
152 
virtual void set_defaults()
set default values for &#39;constant&#39; parameters, e.g. minweight and maxweight
MinorantPointer center_aggr
the aggregate stored for the current center, may be empty if not available
Definition: BundleRQBWeight.hxx:28
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 normsubg2, BundleProxObject *Hp)
determine next weight after a null step
CH_Matrix_Classes::Real delhat1
oldval-modelval at t==1 unchanged
Definition: BundleRQBWeight.hxx:45
abstract interface that allows to use different -norms with a positive definite matrix in the proxi...
Definition: BundleProxObject.hxx:88
virtual void set_maxweight(CH_Matrix_Classes::Real mw)
<=0 means no bound
Definition: BundleRQBWeight.hxx:102
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
CH_Matrix_Classes::Real eta
parameter for "zero subgradients"
Definition: BundleRQBWeight.hxx:40
CH_Matrix_Classes::Real weight
the current weight
Definition: BundleRQBWeight.hxx:29
bool weight_changed() const
returns true if last call of *_update modified current value of tau, else 0
Groundset * groundset
the groundset, may not be zero in init and *_update
Definition: BundleRQBWeight.hxx:26
virtual void clear()
reset all adaptive variables and parameters
CH_Matrix_Classes::Real m1
parameter for descent step
Definition: BundleRQBWeight.hxx:37
CH_Matrix_Classes::Real m3
parameter for "accepting null steps"
Definition: BundleRQBWeight.hxx:39
BundleModel * model
may be zero at any time
Definition: BundleRQBWeight.hxx:27
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
BundleRQBWeight(BundleWeight *bwp=0, const CBout *cbo=0, int incr=-1)
bwp may be used to communicate the previous values used by another routine
CH_Matrix_Classes::Real t
recorded inter/extrapolation
Definition: BundleRQBWeight.hxx:43
bool get_next_weight_set() const
true if the next weight was prespecified externally
Definition: BundleRQBWeight.hxx:96
CH_Matrix_Classes::Real tL
lower bound for recording extrapolation
Definition: BundleRQBWeight.hxx:41
virtual int apply_modification(const GroundsetModification &gsmdf)
reinitialize after modifications
CH_Matrix_Classes::Real maxweight
upper bound on the weight, no bound of negative
Definition: BundleRQBWeight.hxx:32
abstract representation of the feasible convex ground set to be optimized over, provides the QP solve...
Definition: Groundset.hxx:77
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 normsubg2, BundleProxObject *Hp)
determine next weight after a descent step
CH_Matrix_Classes::Real minweight
lower bound on the weight, no bound if negative
Definition: BundleRQBWeight.hxx:31
int delta_subg(CH_Matrix_Classes::Matrix &delta_subg, MinorantPointer &center, MinorantPointer &cand)
computes cand-center into delta_subg and retunrs 0 if both are not empty; otherwise it returns 1 ...
CH_Matrix_Classes::Real m2
parameter in (m1,1) for using quasi udpate
Definition: BundleRQBWeight.hxx:38
int init(CH_Matrix_Classes::Real aggr_dnmormsqr, Groundset *groundset, BundleModel *model)
compute first weight and set some parameters
CH_Matrix_Classes::Real get_weight() const
returns current value of the weight
Header declaring the class ConicBundle::BundleWeight.
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
bool next_weight_set
true if set_nextweight was just called, reset at *_update
Definition: BundleRQBWeight.hxx:35
CH_Matrix_Classes::Real tR
upper bound for recording interpolation
Definition: BundleRQBWeight.hxx:42
Abstract interface for BundleSolver providing routines that determine the weight of the quadratic ter...
Definition: BundleWeight.hxx:35
void set_next_weight(CH_Matrix_Classes::Real u)
<=0 leaves everything unchanged and does nothing
Definition: BundleRQBWeight.hxx:79
double max(double a, double b)
maximum value of two double variables
Definition: mymath.hxx:43
void set_minweight(CH_Matrix_Classes::Real mw)
<=0 means no bound
Definition: BundleRQBWeight.hxx:84
bool weightchanged
true if last choose_* call modified the weight
Definition: BundleRQBWeight.hxx:34
CH_Matrix_Classes::Real get_minweight() const
Returns the current value of the minweight.
Definition: BundleRQBWeight.hxx:99
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
Routine for selecting the weight of the quadratic/proximal term within BundleSolver implementing Bund...
Definition: BundleRQBWeight.hxx:24
CH_Matrix_Classes::Real frel
realtive precision w.r.t. function value
Definition: BundleRQBWeight.hxx:44
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
CH_Matrix_Classes::Real get_maxweight() const
Returns the current value of the maxweight.
Definition: BundleRQBWeight.hxx:115