CNDSM  1.00
PrimalDual Class Reference

Definition of the class PrimalDual. More...

#include <PrimalDual.h>

Inheritance diagram for PrimalDual:
Deflection Stepsize

Public Member Functions

 PrimalDual (SubGrad *slvr, istream *iStrm=0)
 Constructor of the class, which derives from both Deflection and Stepsize. More...
 
Other initializations
void SetVOLLog (ostream *outs=0, const char lvl=0)
 
void Format (void)
 
Reading the solution
void NewDEF (void)
 The variant requires thats DR must be computed before SR. More...
 
void NewStep (void)
 
cHpNum GetDFLCoeff (void)
 
HpNum GetStepsize (bool StepIsIncr=false)
 
HpNum GetLev (void)
 
HpNum GetBeta (void)
 
void SetMaxBeta (const HpNum alpha)
 
- Public Member Functions inherited from Deflection
 Deflection (SubGrad *slvr)
 Constructor of the class. 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...
 
virtual ~Deflection ()
 
- Public Member Functions inherited from Stepsize
 Stepsize (SubGrad *slvr, istream *iStrm=0)
 Constructor of the class. More...
 
 Stepsize (SubGrad *slvr, istream *iStrm=0)
 Constructor of the class. More...
 
virtual void SetSTPLog (ostream *outs=0, const char lvl=0)
 The class outputs "log" information onto the ostream pointed by outs. More...
 
virtual void SetSTPLog (ostream *outs=0, const char lvl=0)
 The class outputs "log" information onto the ostream pointed by outs. More...
 
virtual bool NeedsdkM1Gk (void)
 Returns true if the stepsize requires the scalar product $ d_{i-1}^{\top} g_i$. More...
 
virtual bool NeedsdkM1Gk (void)
 Returns true if the stepsize requires the scalar product $ d_{i-1}^{\top} g_i$. More...
 
virtual ~Stepsize ()
 
virtual ~Stepsize ()
 

Additional Inherited Members

- Protected Member Functions inherited from Deflection
FiOracleGetOracle (void)
 Returns the pointer to FiOracle. More...
 
HpNum GetStepsize (void)
 Returns the stepsize $\nu_i$. More...
 
cHpNum GetGiNorm (void)
 Returns the norm of the subgradient $ g_i $. More...
 
cHpNum GetDNorm (void)
 Returns the norm of the direction $ d_i $. More...
 
cHpNum GetdGk (void)
 Returns the scalar product $ g_i^{\top} d_i $. More...
 
cHpNum GetSigma (void)
 Returns the linearization error $ \sigma_i $. More...
 
cHpNum GetEpsilon (void)
 Returns the linearization error $ \epsilon_i $. More...
 
cHpNum ReadFVal (void)
 Returns the full function $ f(\lambda_i) $. More...
 
- Protected Member Functions inherited from Stepsize
virtual bool UpdateTargetLevel (void)
 It tries to provide a new target level $ f^{lev}_i $. More...
 
virtual bool UpdateTargetLevel (void)
 It tries to provide a new target level $ f^{lev}_i $. More...
 
HpNum GetCoeffDefl (void)
 Returns the deflection coefficient $\alpha_i$. More...
 
FiOracleGetOracle (void)
 Returns the pointer to FiOracle. More...
 
cHpNum GetGiNorm (void)
 Returns the norm of the subgradient $ g_i $. More...
 
cHpNum GetDNorm (void)
 Returns the norm of the direction $ d_i $. More...
 
cHpNum GetdGk (void)
 Returns the scalar product $ g_i^{\top} d_i$. More...
 
HpNum GetdkM1Gk (void)
 Returns the scalar product $ g_i^{\top} d_{i-1}$. More...
 
Index GetNItIcr (void)
 Returns NItIncr, the parameter for incremental iterations [see SubGrad.h].
 
cHpNum ReadFkVal (void)
 Returns FiLambda [ see SubGrad.h ]. More...
 
cHpNum ReadFiBar (void)
 Returns FiBar [ see SubGrad.h ]. More...
 
HpNum GetCoeffDefl (void)
 Returns the deflection coefficient $\alpha_i$. More...
 
FiOracleGetOracle (void)
 Returns the pointer to FiOracle. More...
 
cHpNum GetGiNorm (void)
 Returns the norm of the subgradient $ g_i $. More...
 
cHpNum GetDNorm (void)
 Returns the norm of the direction $ d_i $. More...
 
cHpNum GetdGk (void)
 Returns the scalar product $ g_i^{\top} d_i$. More...
 
HpNum GetdkM1Gk (void)
 Returns the scalar product $ g_i^{\top} d_{i-1}$. More...
 
Index GetNItIcr (void)
 Returns NItIncr, the parameter for incremental iterations [see SubGrad.h].
 
cHpNum ReadFkVal (void)
 Returns FiLambda [ see SubGrad.h ]. More...
 
cHpNum ReadFiBar (void)
 Returns FiBar [ see SubGrad.h ]. More...
 
- Protected Attributes inherited from Deflection
SubGradSolver
 (pointer to) the SubGrad solver
 
ostream * VOLLog
 the output stream object
 
char VOLLLvl
 the "level of verbosity"
 
- Protected Attributes inherited from Stepsize
SubGradSolver
 (pointer to) the SubGrad solver
 
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 PrimalDual.

This class implements two variants of the Primal-Dual subgradient method (PDSM): simple and weighted averages, under a unified SM scheme. The method has a fixed stability center, and the direction $ d_i $ can be regarded as the average of all the previous weighted subgradients, i.e.:

\[ d_i = ( \sum_{k=1}^i \upsilon_k g_k) / \Delta_i \quad,\quad \Delta_i = \sum_{k=1}^i \upsilon_k \]

It is worth mentioning that the subgradient weights $\upsilon_k $ can be non-vanishing as $k\rightarrow \infty$. The stepsize rule (SR) and the deflection rule (DR), respectively, are:

\[ \alpha_i = \upsilon_i / \Delta_i \quad,\quad \nu_i = \Delta_i / \omega_i \]

where $\omega_i$ is chosen in a suitable way.

Constructor & Destructor Documentation

PrimalDual ( SubGrad slvr,
istream *  iStrm = 0 
)
inline

Constructor of the class, which derives from both Deflection and Stepsize.

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

  1. bool average [true] if true simple averages are used, otherwise weighted averages are used

For this class, the general parameter LpsFct -defined in Stepsize.h- represents the gamma factor F used to set $\omega_i$.

References Deflection::Format(), FiOracle::GetGlobalLipschitz(), Deflection::GetOracle(), Deflection::GetStepsize(), Stepsize::LpsFct, Deflection::SetVOLLog(), Deflection::VOLLLvl, and Deflection::VOLLog.

Member Function Documentation

void NewDEF ( void  )
inlinevirtual

The variant requires thats DR must be computed before SR.

Hence, the call to NewDEF comes before the one to NewStep.

Implements Deflection.

References Deflection::GetGiNorm(), Stepsize::LpsFct, and Deflection::Solver.