NDOSolver / FiOracle
Interfaces and Solvers for NonDifferentiable Optimization
Loading...
Searching...
No Matches
ColorTV Class Reference

#include <ColorTV.h>

Inheritance diagram for ColorTV:
Stepsize

Public Types

Public types

The ColorTV defines one main public types:

enum  condition { green , yellow , red }
 

Public Member Functions

 ColorTV (SubGrad *slvr, std::istream *iStrm=0)
 
void SetSTPLog (ostream *outs=0, const char lvl=0)
 
void Format (void)
 
void NewStep (void)
 
bool NeedsdkM1Gk (void)
 
- Public Member Functions inherited from Stepsize
 Stepsize (SubGrad *slvr, istream *iStrm=0)
 
virtual void SetSTPLog (std::ostream *outs=0, const char lvl=0)
 
virtual HpNum GetStepsize (bool StepIsIncr=false)
 
virtual HpNum GetLev (void)
 
virtual HpNum GetBeta (void)
 
virtual void SetMaxBeta (const HpNum alpha)
 

Protected Member Functions

bool UpdateTargetLevel (void)
 
- Protected Member Functions inherited from Stepsize
HpNum GetCoeffDefl (void)
 
FiOracleGetOracle (void)
 
HpNum GetGiNorm (void)
 
HpNum GetDNorm (void)
 
HpNum GetdGk (void)
 
HpNum GetdkM1Gk (void)
 
Index GetNItIcr (void)
 
HpNum ReadFkVal (void)
 
HpNum ReadFiBar (void)
 

Private Member Functions

condition coloring (void)
 

Private Attributes

Index greentestinvl
 maximum number of consecutive green iteration
 
Index yellowtestinvl
 maximum number of consecutive yellow iteration
 
Index redtestinvl
 maximum number of consecutive red iteration
 
Index lastgreeniter
 the last green iteration
 
Index lastyellowiter
 the last yellow iteration
 
Index lastrediter
 the last red iteration
 
HpNum BetaZero
 
HpNum LwrBnd
 lower bound
 
HpNum lastvalue
 the previous function value
 
HpNum FiLmbd
 current FiLambda
 
Index NrIter
 

Additional Inherited Members

- Protected Attributes inherited from Stepsize
SubGradSolver
 (pointer to) the SubGrad solver
 
std::ostream * STPLog
 the output stream object
 
char STPLLvl
 the "level of verbosity"
 
HpNum FiLev
 the target level \( f^{lev}_i \)
 
HpNum Beta
 beta factor \( \beta_i \)
 
HpNum MaxBeta
 maximum value for beta factor
 
HpNum LpsFct
 scaling factor
 

Detailed Description

Definition of the class ColorTV. This class implements the target stepsize used in the original Volume algorithm. The method is based on classifying the iterations based on the obtained improvement of the function Fi().

Member Enumeration Documentation

◆ condition

enum condition
Enumerator
green 

good step

yellow 

not bad, not good step

red 

bad step

Constructor & Destructor Documentation

◆ ColorTV()

ColorTV ( SubGrad * slvr,
std::istream * iStrm = 0 )
inline

Constructor of the class. Since the constructor of ColorTV is executed after the one of Stepsize, the following parameters specific for ColorTV have to be found in the stream after those of the base class [see the comments to the constructor of Stepsize]:

  1. HpNum BetaZero [1] initial value of beta
  2. Index greentestinvl [1] how many consecutive green iterations are allowed before increasing beta
  3. Index yellowtestinvl [400] how many consecutive yellow iterations are allowed before decreasing beta
  4. Index redtestinvl [10] how many consecutive red iterations are allowed before decreasing beta

Member Function Documentation

◆ Format()

void Format ( void )
inlinevirtual

The method initializes the stepsize rule.

Reimplemented from Stepsize.

◆ NeedsdkM1Gk()

bool NeedsdkM1Gk ( void )
inlinevirtual

Returns true if the stepsize requires the scalar product \( d_{i-1}^{\top} g_i\). The default implementation don't require this value.

Reimplemented from Stepsize.

◆ NewStep()

void NewStep ( void )
inlinevirtual

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

If the derived class implements a target value stepsize rule, the method must compute both the scalar \( \beta_i \) and the level \( f^{lev}_i \).

Typically, the previous step will be unavailable after the call to NewStep() [see GetStepsize()].

Implements Stepsize.

◆ UpdateTargetLevel()

bool UpdateTargetLevel ( void )
inlineprotectedvirtual

It tries to provide a new target level \( f^{lev}_i \). It true is returned, the level has been changed. By default, it returns false.

Reimplemented from Stepsize.


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