ConicBundle
Public Member Functions | Private Attributes | List of all members
ConicBundle::VariableMetric Class Reference

interface class that allows a VariableMetricModel to contribute information to a VariableMetric object for use in a BundleProxObject More...

#include <VariableMetric.hxx>

Inheritance diagram for ConicBundle::VariableMetric:
ConicBundle::CBout ConicBundle::BundleProxObject ConicBundle::BundleDenseTrustRegionProx ConicBundle::BundleDiagonalTrustRegionProx ConicBundle::BundleDLRTrustRegionProx ConicBundle::BundleIdProx ConicBundle::BundleLowRankTrustRegionProx

Public Member Functions

virtual ~VariableMetric ()
 virtual destructor
 
 VariableMetric (VariableMetricSelection *vp=0, bool use_loc_metric=false, bool use_bnds_scaling=false, CBout *cbo=0, int cbinc=-1)
 default constructor; if vp is not zero, ownership of *vp is passed over to *this and *this will delete vp
 
VariableMetricSelectionget_variable_metric_selection () const
 returns 0 or an available VariableMetricSelection object, that may be employed for computing a variable metric term in accordance with the value of use_local_metric
 
void set_variable_metric_selection (VariableMetricSelection *vp=0)
 sets use_variable_metric; the object passed is then owned by this
 
virtual bool supports_dense_variable_metric () const
 returns true if add_dense_variable_metric() is supported
 
virtual bool supports_lowrank_variable_metric () const
 returns true if add_variable_metric() does not ignore the low rank argument vecH
 
virtual bool supports_diagonal_variable_metric () const
 returns true if add_variable_metric() does not ignore the diagonal argument diagH
 
bool employ_variable_metric () const
 returns true if some dynamic scaling is supported and switched on
 
virtual int apply_variable_metric (VariableMetricModel *, VariableMetricModel *, const CH_Matrix_Classes::Matrix &, CH_Matrix_Classes::Integer, const CH_Matrix_Classes::Matrix &, bool, CH_Matrix_Classes::Real &, CH_Matrix_Classes::Real, const CH_Matrix_Classes::Indexmatrix *=0)
 the BundleSolver starts an update of this by dynamic scaling by calling this in every step; negative parameters give no preferences, but the global aggregate (groundset+model) has to be provided and if descent_step==false the scaling may only increase
 
virtual int add_variable_metric (CH_Matrix_Classes::Symmatrix &)
 adds a suitable modification of symH (symH may be modified in this) to the scaling matrix H More...
 
virtual int add_variable_metric (CH_Matrix_Classes::Matrix &, CH_Matrix_Classes::Matrix &)
 adds (a suitable modification of) Diag(diagH)+vecH*transpose(vecH) to the scaling matrix H (either matrix may be modified in this) More...
 
virtual int push_aft (const AffineFunctionTransformation *)
 this AffineFunctionTransformation has to be used before applying Hinv in
 
virtual int pop_aft ()
 removes the top most aft (without deleting it!)
 
bool get_use_bounds_scaling () const
 returns use_bounds_scaling
 
void set_use_bounds_scaling (bool bounds_scaling)
 sets use_bounds_scaling
 
virtual bool supports_diagonal_bounds_scaling () const
 if the respective implementation supports a diagonal bounds scaling heuristic, the following routine has to return true; see also diagonal_scaling_heuristic_update()
 
bool employ_diagonal_bounds_scaling () const
 if the respective implementation supports a diagonal bounds scaling heuristic, the following routine has to return true; see also diagonal_bounds_scaling_update()
 
virtual int diagonal_bounds_scaling_update (const CH_Matrix_Classes::Matrix &)
 if supported, D_update has to contain nonnegative numbers that are permanently added to the diagonal here. More...
 
bool get_use_local_metric () const
 returns use_local_metric
 
void set_use_local_metric (bool local_metric)
 sets use_local_metric
 
- 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
 

Private Attributes

VariableMetricSelectionvm_selection
 NULL also signals not to call dynamic VariableMetric routines; if a corresponding object has been transferred to here, variable metric should be used. The object serves as a default routine for contributing variable metric information derived from the latest minorants.
 
bool use_local_metric
 flag for whether the scaling information should be collected from active local models; if false, only the root model may provide the scaling information for all
 
bool use_bounds_scaling
 flag for whether LPGroundset may use its diagonal update heuristic for bounds
 

Detailed Description

interface class that allows a VariableMetricModel to contribute information to a VariableMetric object for use in a BundleProxObject

Member Function Documentation

◆ add_variable_metric() [1/2]

virtual int ConicBundle::VariableMetric::add_variable_metric ( CH_Matrix_Classes::Symmatrix )
inlinevirtual

adds a suitable modification of symH (symH may be modified in this) to the scaling matrix H

The suitable modification depends on the on the affine transformations applied to the model or to the form supported by this class. The latter may, e.g., be only a diagonal matrix, a low rank matrix or a dense one.

Reimplemented in ConicBundle::BundleDenseTrustRegionProx.

◆ add_variable_metric() [2/2]

virtual int ConicBundle::VariableMetric::add_variable_metric ( CH_Matrix_Classes::Matrix ,
CH_Matrix_Classes::Matrix  
)
inlinevirtual

adds (a suitable modification of) Diag(diagH)+vecH*transpose(vecH) to the scaling matrix H (either matrix may be modified in this)

The suitable modification depends on the on the affine transformations applied to the model or to the form supported by this class. The latter may, e.g., be only a diagonal matrix, a low rank matrix or a dense one.

Any of the two arguments may be an empty matrix (0x0)and this part is then ignored.

Reimplemented in ConicBundle::BundleDenseTrustRegionProx, ConicBundle::BundleDiagonalTrustRegionProx, ConicBundle::BundleLowRankTrustRegionProx, and ConicBundle::BundleDLRTrustRegionProx.

◆ diagonal_bounds_scaling_update()

virtual int ConicBundle::VariableMetric::diagonal_bounds_scaling_update ( const CH_Matrix_Classes::Matrix )
inlinevirtual

if supported, D_update has to contain nonnegative numbers that are permanently added to the diagonal here.

It is important to keep track of this change only if afterwards update_QP_costs is called before compute_QP_costs. In this case the nonzero entries in D_update must be a subset of the indices in delta_index

Reimplemented in ConicBundle::BundleDenseTrustRegionProx, ConicBundle::BundleDiagonalTrustRegionProx, and ConicBundle::BundleDLRTrustRegionProx.


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