CNDSM
1.00
|
The class Deflection provides an interface for the deflection rule (DR), to be used in the SubGrad solver [see SubGrad.h]. More...
#include <Deflection.h>
Public Member Functions | |
Constructor | |
Deflection (SubGrad *slvr) | |
Constructor of the class. More... | |
Other initializations | |
virtual void | SetVOLLog (ostream *outs=0, const char lvl=0) |
The class outputs "log" information onto the ostream pointed by outs. More... | |
virtual void | Format (void) |
The method initializes the DR. More... | |
Reading the solution | |
virtual void | NewDEF (void)=0 |
This method must be called before GetDFLCoeff() [see below]. More... | |
virtual cHpNum | GetDFLCoeff (void)=0 |
Returns the deflection coefficient. More... | |
virtual const bool | DoSS (void) |
Returns true if a Serious Step (SS) takes place. More... | |
virtual cHpNum | Delta (void) |
Returns the expected improvement in the objective function [see DoSS()]. More... | |
Destructor | |
virtual | ~Deflection () |
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). | |
FiOracle * | GetOracle (void) |
Returns the pointer to FiOracle. More... | |
HpNum | GetStepsize (void) |
Returns the stepsize ![]() | |
cHpNum | GetGiNorm (void) |
Returns the norm of the subgradient ![]() | |
cHpNum | GetDNorm (void) |
Returns the norm of the direction ![]() | |
cHpNum | GetdGk (void) |
Returns the scalar product ![]() | |
cHpNum | GetSigma (void) |
Returns the linearization error ![]() | |
cHpNum | GetEpsilon (void) |
Returns the linearization error ![]() | |
cHpNum | ReadFVal (void) |
Returns the full function ![]() | |
Protected Attributes | |
SubGrad * | Solver |
(pointer to) the SubGrad solver | |
ostream * | VOLLog |
the output stream object | |
char | VOLLLvl |
the "level of verbosity" | |
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 , which is employed in the search direction formula as follows:
The user must extend the class to one or more deflection rules following this interface.
|
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., , which however in SubGrad is treated by just setting the null Deflection object).
|
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.
Referenced by PrimalDual::PrimalDual(), and Volume::Volume().
|
inlinevirtual |
The method initializes the DR.
It does nothing for the base class.
Referenced by PrimalDual::PrimalDual(), and Volume::Volume().
|
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.
|
pure virtual |
Returns the deflection coefficient.
This function must be called after NewDEF() [see above].
|
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 is obtained, usually it should be as good as the expected improvement [see Delta()].
|
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.
|
protected |
Returns the pointer to FiOracle.
Thus, Deflection can ask directly the FiOracle object for the function information.
Referenced by PrimalDual::PrimalDual().
|
protected |
Returns the stepsize .
Referenced by PrimalDual::PrimalDual().
|
protected |
Returns the norm of the subgradient .
Referenced by PrimalDual::NewDEF().
|
protected |
Returns the norm of the direction .
|
protected |
Returns the scalar product .
|
protected |
Returns the linearization error .
|
protected |
Returns the linearization error .
|
protected |
Returns the full function .