NDOSolver / FiOracle
Interfaces and Solvers for NonDifferentiable Optimization
Loading...
Searching...
No Matches
Deflection Class Referenceabstract

#include <Deflection.h>

Inheritance diagram for Deflection:
PrimalDual Volume

Public Member Functions

Constructor
 Deflection (SubGrad *slvr)
 
Other initializations
virtual void SetVOLLog (std::ostream *outs=0, const char lvl=0)
 
virtual void Format (void)
 
Deflection computation
virtual void NewDEF (void)=0
 
Reading the solution
virtual HpNum GetDFLCoeff (void)=0
 
virtual bool DoSS (void)
 
virtual HpNum Delta (void)
 
Destructor

Protected Member Functions

Protected methods to read from Subgrad

These methods are used to provide access to the information stored into the SubGrad object. Deflection is a "friend" of SubGrad and therefore it can read its protected data structures, but classes derived from Deflection are not friend of SubGrad and cannot. This is why these methods are defined in the base class (and implemented in SubGrad.C).

FiOracleGetOracle (void)
 
HpNum GetStepsize (void)
 
HpNum GetGiNorm (void)
 
HpNum GetDNorm (void)
 
HpNum GetdGk (void)
 
HpNum GetSigma (void)
 
HpNum GetEpsilon (void)
 
HpNum ReadFVal (void)
 

Protected Attributes

SubGradSolver
 (pointer to) the SubGrad solver
 
std::ostream * VOLLog
 the output stream object
 
char VOLLLvl
 the "level of verbosity"
 

Detailed Description

The class Deflection provides an interface for the deflection rule (DR), to be used in the SubGrad solver [see SubGrad.h].

The aim of this class is to compute the deflection coefficient \( \alpha_i \), which is employed in the search direction formula as follows:

\[ d_i = \alpha_i g_i + (1-\alpha_i)d_{i-1}\;. \]

The user must extend the class to one or more deflection rules following this interface.

Constructor & Destructor Documentation

◆ Deflection()

Deflection ( SubGrad * slvr)
inline

Constructor of the class. It has no parameters apart the SubGrad object using it because there is no "standard" deflection rule (except "no deflection", i.e., \( \alpha_i = 1 \), which however in SubGrad is treated by just setting the null Deflection object).

Member Function Documentation

◆ Delta()

virtual HpNum Delta ( void )
inlinevirtual

Returns the expected improvement in the objective function [see DoSS()]. This value is not useful for all DR. By default Inf< HpNum >() is returned.

Reimplemented in Volume.

◆ DoSS()

virtual bool DoSS ( void )
inlinevirtual

Returns true if a Serious Step (SS) takes place. Otherwise a Null Step (NS) occurs. By default, true is returned.

Typically, a SS occurs when a " good " improvement of the function \( f \) is obtained, usually it should be as good as the expected improvement [see Delta()].

Reimplemented in Volume.

◆ Format()

virtual void Format ( void )
inlinevirtual

The method initializes the DR. It does nothing for the base class.

Reimplemented in PrimalDual, and Volume.

◆ GetDFLCoeff()

virtual HpNum GetDFLCoeff ( void )
pure virtual

Returns the deflection coefficient. This function must be called after NewDEF() [see above].

Implemented in PrimalDual, and Volume.

◆ GetdGk()

HpNum GetdGk ( void )
protected

Returns the scalar product \( g_i^{\top} d_i \).

◆ GetDNorm()

HpNum GetDNorm ( void )
protected

Returns the norm of the direction \( d_i \).

◆ GetEpsilon()

HpNum GetEpsilon ( void )
protected

Returns the linearization error \( \epsilon_i \).

◆ GetGiNorm()

HpNum GetGiNorm ( void )
protected

Returns the norm of the subgradient \( g_i \).

◆ GetOracle()

FiOracle * GetOracle ( void )
protected

Returns the pointer to FiOracle. Thus, Deflection can ask directly the FiOracle object for the function information.

◆ GetSigma()

HpNum GetSigma ( void )
protected

Returns the linearization error \( \sigma_i \).

◆ GetStepsize()

HpNum GetStepsize ( void )
protected

Returns the stepsize \(\nu_i\).

◆ NewDEF()

virtual void NewDEF ( void )
pure virtual

This method must be called before GetDFLCoeff() [see below]. This is indeed the core of every derived class, producing a new deflection coefficient.

Typically, the previous coefficient will be unavailable after the call to NewDEF() [GetDFLCoeff()].

Implemented in PrimalDual, and Volume.

◆ ReadFVal()

HpNum ReadFVal ( void )
protected

Returns the full function \( f(\lambda_i) \).

◆ SetVOLLog()

virtual void SetVOLLog ( std::ostream * outs = 0,
const char lvl = 0 )
inlinevirtual

The class outputs "log" information onto the ostream pointed by outs. lvl controls the "level of verbosity" of the code: lvl == 0 means that nothing at all is printed, and values larger than 0 mean increasing amounts of information, the specific effect of each value being derived- class-dependent. outs == 0 implies lvl == 0.


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