Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
limbo::solvers::SubGradientDescent< T > Class Template Reference

Update lagrangian multiplier with subgradient descent. More...

#include <MultiKnapsackLagRelax.h>

Inheritance diagram for limbo::solvers::SubGradientDescent< T >:
limbo::solvers::LagMultiplierUpdater< T >

Public Types

typedef LagMultiplierUpdater< T > base_type
 base type
 
typedef base_type::value_type value_type
 value type
 
- Public Types inherited from limbo::solvers::LagMultiplierUpdater< T >
typedef T value_type
 value type
 

Public Member Functions

 SubGradientDescent (value_type alpha=1, value_type beta=1)
 constructor More...
 
 SubGradientDescent (SubGradientDescent const &rhs)
 copy constructor More...
 
SubGradientDescentoperator= (SubGradientDescent const &rhs)
 assignment More...
 
 ~SubGradientDescent ()
 destructor
 
value_type operator() (unsigned int iter, value_type multiplier, value_type slackness)
 API to update lagrangian multiplier using subgradient descent. More...
 
void operator() (unsigned int iter, unsigned int n, value_type const *vSlackness, value_type const *vLagMultiplier, value_type *vNewLagMultiplier)
 API to update lagrangian multiplier using subgradient descent. More...
 
- Public Member Functions inherited from limbo::solvers::LagMultiplierUpdater< T >
 LagMultiplierUpdater ()
 constructor
 
virtual ~LagMultiplierUpdater ()
 destructor
 

Protected Member Functions

void copy (SubGradientDescent const &rhs)
 copy object More...
 
void computeScalingFactor (unsigned int iter)
 compute scaling factor More...
 

Protected Attributes

value_type m_alpha
 power
 
value_type m_beta
 constant
 
unsigned int m_iter
 current iteration
 
value_type m_scalingFactor
 scaling factor \( t_k = \beta \cdot k^{-\alpha} \)
 

Detailed Description

template<typename T>
class limbo::solvers::SubGradientDescent< T >

Update lagrangian multiplier with subgradient descent.

Template Parameters
Tcoefficient value type

Definition at line 25 of file MultiKnapsackLagRelax.h.

Constructor & Destructor Documentation

template<typename T>
limbo::solvers::SubGradientDescent< T >::SubGradientDescent ( value_type  alpha = 1,
value_type  beta = 1 
)
inline

constructor

Parameters
alphathe power term for scaling factor \( t_k = \beta \cdot k^{-\alpha} \)
betathe constant

Definition at line 973 of file MultiKnapsackLagRelax.h.

template<typename T>
limbo::solvers::SubGradientDescent< T >::SubGradientDescent ( SubGradientDescent< T > const &  rhs)
inline

copy constructor

right hand side

Definition at line 983 of file MultiKnapsackLagRelax.h.

Member Function Documentation

template<typename T>
void limbo::solvers::SubGradientDescent< T >::computeScalingFactor ( unsigned int  iter)
inlineprotected

compute scaling factor

Parameters
itercurrent iteration

Definition at line 1048 of file MultiKnapsackLagRelax.h.

template<typename T>
void limbo::solvers::SubGradientDescent< T >::copy ( SubGradientDescent< T > const &  rhs)
inlineprotected

copy object

right hand side

Definition at line 1039 of file MultiKnapsackLagRelax.h.

template<typename T>
value_type limbo::solvers::SubGradientDescent< T >::operator() ( unsigned int  iter,
value_type  multiplier,
value_type  slackness 
)
inlinevirtual

API to update lagrangian multiplier using subgradient descent.

Parameters
itercurrent iteration
multipliercurrent multiplier value
slacknesscurrent slackness value assuming the constraint is in \( Ax \le b \) and compute \( b-Ax \)
Returns
updated multiplier value

Implements limbo::solvers::LagMultiplierUpdater< T >.

Definition at line 1008 of file MultiKnapsackLagRelax.h.

template<typename T>
void limbo::solvers::SubGradientDescent< T >::operator() ( unsigned int  iter,
unsigned int  n,
value_type const *  vSlackness,
value_type const *  vLagMultiplier,
value_type vNewLagMultiplier 
)
inlinevirtual

API to update lagrangian multiplier using subgradient descent.

Parameters
itercurrent iteration
ndimension
vSlacknessarray of slackness
vLagMultiplierarray of lagrangian multipliers
vNewLagMultiplierarray of new lagrangian multipliers

Implements limbo::solvers::LagMultiplierUpdater< T >.

Definition at line 1021 of file MultiKnapsackLagRelax.h.

template<typename T>
SubGradientDescent& limbo::solvers::SubGradientDescent< T >::operator= ( SubGradientDescent< T > const &  rhs)
inline

assignment

right hand side

Definition at line 989 of file MultiKnapsackLagRelax.h.


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