All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roboptim::ScalingHelper< T > Class Template Reference

Helper class used to help the user find good scaling parameters. More...

#include <roboptim/core/scaling-helper.hh>

Public Types

typedef Problem< T > problem_t
 
typedef problem_t::value_type value_type
 
typedef problem_t::size_type size_type
 
typedef problem_t::argument_t argument_t
 
typedef problem_t::scaling_t scaling_t
 
typedef problem_t::interval_t interval_t
 
typedef problem_t::constraints_t constraints_t
 
typedef problem_t::function_t function_t
 
typedef problem_t::jacobian_t jacobian_t
 
typedef boost::shared_ptr
< function_t
constraint_t
 
typedef std::pair
< constraint_t, scaling_t
scalingFunc_t
 

Public Member Functions

 ScalingHelper (const problem_t &pb, const interval_t &gradRange=function_t::makeInterval(0.1, 10.))
 Constructor. More...
 
virtual ~ScalingHelper ()
 
void computeScaling (const std::vector< argument_t > &x)
 Get a possible scaling vector based on the gradient's infinity norm. More...
 
virtual std::ostream & print (std::ostream &o) const
 Print method. More...
 

Detailed Description

template<typename T>
class roboptim::ScalingHelper< T >

Helper class used to help the user find good scaling parameters.

We want the gradients to be of the order 0.1 to 100.

Template Parameters
Tmatrix type (dense or sparse).

Member Typedef Documentation

template<typename T>
typedef problem_t::argument_t roboptim::ScalingHelper< T >::argument_t
template<typename T>
typedef boost::shared_ptr<function_t> roboptim::ScalingHelper< T >::constraint_t
template<typename T>
typedef problem_t::function_t roboptim::ScalingHelper< T >::function_t
template<typename T>
typedef problem_t::interval_t roboptim::ScalingHelper< T >::interval_t
template<typename T>
typedef problem_t::jacobian_t roboptim::ScalingHelper< T >::jacobian_t
template<typename T>
typedef Problem<T> roboptim::ScalingHelper< T >::problem_t
template<typename T>
typedef problem_t::scaling_t roboptim::ScalingHelper< T >::scaling_t
template<typename T>
typedef std::pair<constraint_t, scaling_t> roboptim::ScalingHelper< T >::scalingFunc_t
template<typename T>
typedef problem_t::size_type roboptim::ScalingHelper< T >::size_type
template<typename T>
typedef problem_t::value_type roboptim::ScalingHelper< T >::value_type

Constructor & Destructor Documentation

template<typename T >
roboptim::ScalingHelper< T >::ScalingHelper ( const problem_t pb,
const interval_t gradRange = function_t::makeInterval (0.1, 10.) 
)

Constructor.

Parameters
pbinput problem.
gradRangevalid absolute gradient range after scaling.

References roboptim::Problem< T >::constraints().

template<typename T >
roboptim::ScalingHelper< T >::~ScalingHelper ( )
virtual

Member Function Documentation

template<typename T >
void roboptim::ScalingHelper< T >::computeScaling ( const std::vector< argument_t > &  x)

Get a possible scaling vector based on the gradient's infinity norm.

Parameters
xvector of arguments to consider.
Returns
scaling vector.

References roboptim::GenericDifferentiableFunction< T >::jacobian().

template<typename T >
std::ostream & roboptim::ScalingHelper< T >::print ( std::ostream &  o) const
virtual

Print method.

Parameters
ooutput stream.
Returns
modified output stream.

References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().

Referenced by roboptim::operator<<().