3 #ifndef CONICBUNDLE_DLRTRUSTREGIONPROX_HXX 4 #define CONICBUNDLE_DLRTRUSTREGIONPROX_HXX 77 std::vector<const AffineFunctionTransformation*>
aft_stack;
103 bool local_metric=
false,
104 CBout* cb=0,
int inc=-1):
106 weightu(1.),D(dim,1,weightu),vecH(dim,0,0.)
113 bool local_metric=
false,
114 CBout* cb=0,
int inc=-1):
116 {weightu=1.;
init(in_D,in_vecH);}
237 { aft_stack.push_back(aft);
return 0;}
242 aft_stack.pop_back();
virtual CH_Matrix_Classes::Real norm_sqr(const CH_Matrix_Classes::Matrix &B) const
returns $|B|^2_H$ (with weight included)
void compute_corr()
computes the correction value, here min(1,dim/trace(H))
Definition: BundleDLRTrustRegionProx.hxx:95
CH_Matrix_Classes::Symmatrix old_LinvQ
the old quadratic cost matrix dependent on the low rank part
Definition: BundleDLRTrustRegionProx.hxx:67
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
virtual int apply_modification(const GroundsetModification &gsmdf)
when BundleSolver is called to modify the groundset it also calls this
BundleDLRTrustRegionProx(CH_Matrix_Classes::Integer dim=0, VariableMetricSelection *vp=0, bool local_metric=false, CBout *cb=0, int inc=-1)
default constructor with empty H (equal to zero) and the dimension as argument
Definition: BundleDLRTrustRegionProx.hxx:101
abstract interface that allows to use different -norms with a positive definite matrix in the proxi...
Definition: BundleProxObject.hxx:88
virtual void get_precond(CH_Matrix_Classes::Matrix &inD, const CH_Matrix_Classes::Matrix *&Vp) const
returns a suitable approximation for preconditioning, see BundleProxObject::get_precond ...
Integer rowdim() const
returns the row dimension
Definition: matrix.hxx:215
virtual int apply_variable_metric(VariableMetricModel *groundset, VariableMetricModel *model, const CH_Matrix_Classes::Matrix &aggr, CH_Matrix_Classes::Integer y_id, const CH_Matrix_Classes::Matrix &y, bool descent_step, CH_Matrix_Classes::Real ¤t_weight, CH_Matrix_Classes::Real model_maxviol, const CH_Matrix_Classes::Indexmatrix *new_indices=0)
see DynamicScaling
CH_Matrix_Classes::Real oldoffset
the old costant cost term;
Definition: BundleDLRTrustRegionProx.hxx:71
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
CH_Matrix_Classes::Real weightu
the current weight added to H in the form of weightu*I
Definition: BundleDLRTrustRegionProx.hxx:33
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
void provide_inverse_data(bool skip_old_fixed_ind=false) const
if not yet available this computes the low rank inverse data (possibly restricted to non fixed indice...
virtual bool is_DLR() const
return true if H is of the form diagonal matrix plus Gram matrix of a low rank matrix ...
Definition: BundleDLRTrustRegionProx.hxx:143
Real norm2(const Matrix &A)
returns the Frobenius norm of A, i.e., the square root of the sum of A(i,j)*A(i,j) over all i...
Definition: matrix.hxx:1235
CH_Matrix_Classes::Matrix _b
for compute_QP_costs() this holds the constant subgradient with zeroed fixed parts ...
Definition: BundleDLRTrustRegionProx.hxx:55
CH_Matrix_Classes::Matrix Dinv
the inverse diagonal
Definition: BundleDLRTrustRegionProx.hxx:42
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 &y, const MinorantPointer &groundset_minorant, CH_Matrix_Classes::Indexmatrix *yfixed)
computes the dual QP costs Q, d, and the constant offset to the bundle subproblem, see BundleProxObject::compute_QP_costs
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
adds to outplusHx and returns this
void set_weightu(CH_Matrix_Classes::Real in_weightu)
sets the next weight
Header declaring the class ConicBundle::BundleProxObject.
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 ¢er_y, const MinorantPointer &groundset_minorant, const MinorantPointer &delta_groundset_minorant, const CH_Matrix_Classes::Indexmatrix &delta_index, CH_Matrix_Classes::Indexmatrix *yfixed)
updates the dual QP costs Q, d, and the constant offset to the bundle subproblem, see BundleProxObjec...
virtual bool supports_diagonal_bounds_scaling() const
this implementation does not support a diagonal scaling heuristic, therefore the following routine ha...
Definition: BundleDLRTrustRegionProx.hxx:195
Matrix class of symmetric matrices with real values of type Real
Definition: symmat.hxx:43
CH_Matrix_Classes::Matrix oldd
the old linear cost term;
Definition: BundleDLRTrustRegionProx.hxx:69
virtual int add_H(CH_Matrix_Classes::Symmatrix &big_sym, CH_Matrix_Classes::Integer start_index=0) const
add H to the dense symmetric matrix as a principal submatrix starting at position start_index ...
std::vector< const AffineFunctionTransformation * > aft_stack
in add_variable_metric() the stack serves to transform the given data
Definition: BundleDLRTrustRegionProx.hxx:77
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 int push_aft(const AffineFunctionTransformation *aft)
see BundleProxObject::push_aft();
Definition: BundleDLRTrustRegionProx.hxx:236
declares the interface that a BundelModel needs to provide for contributing to VariableMetric informa...
Definition: VariableMetric.hxx:111
CH_Matrix_Classes::Real get_term_corr() const
returns a correction factor for termination precision if the quadratic term is strong ...
Definition: BundleDLRTrustRegionProx.hxx:129
CH_Matrix_Classes::Real _delta
for compute_QP_costs() this holds the constant offset including fixed contributions ...
Definition: BundleDLRTrustRegionProx.hxx:59
CH_Matrix_Classes::Matrix _c
for compute_QP_costs() this holds the offset values including fixed contributions ...
Definition: BundleDLRTrustRegionProx.hxx:57
virtual int mfile_data(std::ostream &out) const
output the description of the scaling in mfile-suitable format
const CH_Matrix_Classes::Indexmatrix * new_indices
if values should be computed for a new subset indices, this is stored here
Definition: BundleDLRTrustRegionProx.hxx:74
CH_Matrix_Classes::Matrix indLinvHt
for compute_QP_costs() this holds L^{-1}* vecH^T for non fixed indices
Definition: BundleDLRTrustRegionProx.hxx:65
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 ...
Definition: BundleDLRTrustRegionProx.hxx:203
CH_Matrix_Classes::Matrix _y
for compute_QP_costs() this holds the non_fixed part of center_y
Definition: BundleDLRTrustRegionProx.hxx:61
bool needs_cleaning
flag for variable metric, whether columns have been orthogonalized and lam truncated ...
Definition: BundleDLRTrustRegionProx.hxx:80
CH_Matrix_Classes::Integer max_columns
for variable metric this gives an upper bound for collecting columns before cleaning ...
Definition: BundleDLRTrustRegionProx.hxx:83
virtual int pop_aft()
see BundleProxObject::pop_aft();
Definition: BundleDLRTrustRegionProx.hxx:240
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
CH_Matrix_Classes::Matrix vecH
orthogonal columns for the low rank representation (columns scaled by sqrts of eigenvalues) ...
Definition: BundleDLRTrustRegionProx.hxx:39
virtual CH_Matrix_Classes::Real dnorm_sqr(const MinorantPointer &B) const
returns $|B|^2_{H^{-1}}$ (with weight included)
CH_Matrix_Classes::Real corr_val
the correction value for correcting termination precision
Definition: BundleDLRTrustRegionProx.hxx:48
std::ostream * out
not output at all if out==0, otherwise use this output stream
Definition: CBout.hxx:33
CH_Matrix_Classes::Real get_weightu() const
returns the current weight in use
Definition: BundleDLRTrustRegionProx.hxx:125
CH_Matrix_Classes::Matrix D
the diagonal with weightu in it
Definition: BundleDLRTrustRegionProx.hxx:36
CH_Matrix_Classes::Matrix indDinv
the inverse diagonal
Definition: BundleDLRTrustRegionProx.hxx:63
CH_Matrix_Classes::Indexmatrix old_fixed_ind
the fixed indices for which the QP_costs were computed
Definition: BundleDLRTrustRegionProx.hxx:51
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
int sqr(int a)
return a*a for int a
Definition: mymath.hxx:103
void init(const CH_Matrix_Classes::Matrix &in_D, const CH_Matrix_Classes::Matrix &in_vecH)
reset the prox information; the diagaonal part in_D must be a nonnegative column vector, the low rank part in_vecH must have the same number of rows as in_D
virtual int add_variable_metric(CH_Matrix_Classes::Matrix &diagH, CH_Matrix_Classes::Matrix &vecH)
see BundleProxObject::add_variable_metric()
void clean()
if not clean this orthogonalizes vecH and trucates lamH
CH_Matrix_Classes::Matrix LinvHt
this holds L^{-1}*vecH^T*D^{-1} whenever its column dimension equals the row dimension of vecH ...
Definition: BundleDLRTrustRegionProx.hxx:45
virtual BundleProxObject * projected_clone(const CH_Matrix_Classes::Indexmatrix &indices)
in order to allow for fixed variables, this generates a clone restricted to the given indices ...
virtual bool supports_lowrank_variable_metric() const
returns true if variable metric with low rank structure is supported
Definition: BundleDLRTrustRegionProx.hxx:213
CH_Matrix_Classes::Matrix _A
for compute_QP_costs() this holds the subgradients with zeroed fixed parts
Definition: BundleDLRTrustRegionProx.hxx:53
void clear_inverse_data()
if the metric or weightu changes, this resets the inverse data to "not provided"
double min(double a, double b)
minimum value of two double variables
Definition: mymath.hxx:49
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
Integer sum(const Indexmatrix &A)
returns the sum over all elements of A, i.e., (1 1 ... 1)*A*(1 1 ... 1)^T
implements the abstract interface ConicBundle::BundleProxObject for with , i.e., a low rank represen...
Definition: BundleDLRTrustRegionProx.hxx:29
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
virtual bool supports_dense_variable_metric() const
returns true if variable metric with dense symmetric matrices is supported
Definition: BundleDLRTrustRegionProx.hxx:209
BundleDLRTrustRegionProx(const CH_Matrix_Classes::Matrix &in_D, const CH_Matrix_Classes::Matrix &in_vecH, VariableMetricSelection *vp=0, bool local_metric=false, CBout *cb=0, int inc=-1)
constructs H=(D+weightu)+vecH*transpose(vecH) with weightu=1., so in_D must be a column vector with s...
Definition: BundleDLRTrustRegionProx.hxx:110
virtual CH_Matrix_Classes::Matrix & apply_Hinv(CH_Matrix_Classes::Matrix &x) const
returns where
virtual bool supports_diagonal_variable_metric() const
returns true if variable metric with diagonal matrices is supported
Definition: BundleDLRTrustRegionProx.hxx:217