ConicBundle
Public Member Functions | List of all members
ConicBundle::BundleWeight Class Referenceabstract

Abstract interface for BundleSolver providing routines that determine the weight of the quadratic term in the augmented model. It also allows the user to specify bounds on the weights by setting minweight and maxweight or to choose the weight to be used in the next iteration. More...

#include <BundleWeight.hxx>

Inheritance diagram for ConicBundle::BundleWeight:
ConicBundle::CBout ConicBundle::BundleHKWeight ConicBundle::BundleRQBWeight

Public Member Functions

 BundleWeight (const CBout *cb=0, int incr=-1)
 default constructor with the possibility to set the output
 
virtual void set_defaults ()=0
 Sets default values for 'constant' parameters, e.g. minweight and maxweight.
 
virtual void clear ()=0
 Resets all adaptive variables and parameters.
 
virtual int init (CH_Matrix_Classes::Real aggr_dnormsqr, Groundset *groundset, BundleModel *model)=0
 Compute the first weight u and set some parameters,. More...
 
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. More...
 
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 allowed to get arbitrarily close to zero.
 
virtual CH_Matrix_Classes::Real get_minweight () const =0
 Returns the current value of the minweight.
 
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 allowed to get arbitrarily large.
 
virtual CH_Matrix_Classes::Real get_maxweight () const =0
 Returns the current value of the maxweight.
 
virtual CH_Matrix_Classes::Real get_weight () const =0
 Returns the current value of the weight.
 
virtual bool get_next_weight_set () const =0
 returns true if the current weight has been set externally by the user
 
virtual bool weight_changed () const =0
 Returns false only if the last call to descent_update() or nullstep_update() did not modify the weight and no other routine influenced the weight since then, otherwise it returns true.
 
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 step. More...
 
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 step. More...
 
virtual int apply_modification (const GroundsetModification &gsmdf)=0
 if the BundleSolver is called to modify the groundset it also calls this More...
 
- Public Member Functions inherited from ConicBundle::CBout
virtual void set_out (std::ostream *out=0, int print_level=1)
 Specifies the output level (out==NULL: no output at all, out!=NULL and level=0: errors and warnings, level>0 increasingly detailed information) More...
 
virtual void set_cbout (const CBout *cb, int incr=-1)
 Specifies the output level relative to the given CBout class. More...
 
void clear_cbout ()
 reset to default settings (out=0,print_level=1)
 
 CBout (const CBout *cb=0, int incr=-1)
 calls set_cbout
 
 CBout (std::ostream *outp, int pl=1)
 initialize correspondingly
 
 CBout (const CBout &cb, int incr=0)
 copy constructor
 
virtual bool cb_out (int pl=-1) const
 Returns true if out!=0 and (pl<print_level), pl<0 should be used for WARNINGS and ERRORS only, pl==0 for usual output.
 
std::ostream & get_out () const
 If cb_out() returned true, this returns the output stream, but it will abort if called with out==0.
 
std::ostream * get_out_ptr () const
 returns the pointer to the output stream
 
int get_print_level () const
 returns the print_level
 
virtual int mfile_data (std::ostream &out) const
 writes problem data to the given outstream
 

Detailed Description

Abstract interface for BundleSolver providing routines that determine the weight of the quadratic term in the augmented model. It also allows the user to specify bounds on the weights by setting minweight and maxweight or to choose the weight to be used in the next iteration.

Member Function Documentation

◆ apply_modification()

virtual int ConicBundle::BundleWeight::apply_modification ( const GroundsetModification gsmdf)
pure virtual

if the BundleSolver is called to modify the groundset it also calls this

The task is then to update the stored information appropriately so that dimensions match and the proximal term makes sense for the modified problem

Implemented in ConicBundle::BundleRQBWeight, and ConicBundle::BundleHKWeight.

Referenced by BundleWeight().

◆ descent_update()

virtual int ConicBundle::BundleWeight::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 
)
pure virtual

The BundleSolver calls this for computing the next weight if the candidate will result in a descent step.

Parameters
[in]newvalobjective value in the candidate (next center)
[in]oldvalobjective value in the current (old) center
[in]modelvalvalue of the current model in the candidate
[in]ycurrent (old) center
[in]newycandidate (next center)
[in]aggr_dnormsqrsquared dual norm of new_aggregate
[in]Hppointer to scaling information
Returns
  • 0 on success
  • 1 on failure

Implemented in ConicBundle::BundleRQBWeight, and ConicBundle::BundleHKWeight.

Referenced by BundleWeight().

◆ init()

virtual int ConicBundle::BundleWeight::init ( CH_Matrix_Classes::Real  aggr_dnormsqr,
Groundset groundset,
BundleModel model 
)
pure virtual

Compute the first weight u and set some parameters,.

Parameters
[in]aggr_dnormsqrthe squared dual norm of the current aggregate
[in]groundsetpointer to the current groundset
[in]modelpointer to the current model
Returns
  • 0 on success
  • 1 on failure

Implemented in ConicBundle::BundleRQBWeight, and ConicBundle::BundleHKWeight.

Referenced by BundleWeight().

◆ nullstep_update()

virtual int ConicBundle::BundleWeight::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 
)
pure virtual

The BundleSolver calls this for computing the next weight if if the candidate will result in a null step.

Parameters
[in]newvalobjective value in the candidate
[in]oldvalobjective value in the current center
[in]modelvalvalue of the current model in the candidate
[in]ycurrent center
[in]newycandidate
[in]new_minorantthe new subgradient obtained in the candidate (only some rules need this)
[in]aggregatethe aggregate generating the candidate
[in]nullstep_boundevaluationts giving a higer value than this result in null steps
[in]aggr_dnormsqrsquared dual norm of the aggregate
[in]Hppointer to scaling/variable metric information
Returns
  • 0 on success
  • 1 on failure

Implemented in ConicBundle::BundleRQBWeight, and ConicBundle::BundleHKWeight.

Referenced by BundleWeight().

◆ set_next_weight()

virtual void ConicBundle::BundleWeight::set_next_weight ( CH_Matrix_Classes::Real  u)
pure virtual

Allows the user to set the weight of the very next iteration of the bundle method.

As it is set by the user, the weight will be accepted as long as it is strictly positive, even if it is outside the interval [minweight,maxweight]. Nonpositive values, however, will leave everything unchangend.

Implemented in ConicBundle::BundleRQBWeight, and ConicBundle::BundleHKWeight.

Referenced by BundleWeight().


The documentation for this class was generated from the following file: