ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | List of all members
ConstrainedOptPack::MeritFuncCalc1DQuadratic Class Reference

Adds the ability to compute phi(alpha) at alpha of a given set of vectors. More...

#include <ConstrainedOptPack_MeritFuncCalc1DQuadratic.hpp>

Inheritance diagram for ConstrainedOptPack::MeritFuncCalc1DQuadratic:
Inheritance graph
[legend]

Public Types

typedef const Vector * const_VectorWithOp_ptr
 

Constructors

 MeritFuncCalc1DQuadratic (const MeritFuncCalc &phi, size_type p, const_VectorWithOp_ptr d[], VectorMutable *x)
 The only constructor. More...
 

Overridden from MeritFuncCalc1D

value_type operator() (value_type alpha) const
 Returns phi( x = sum( alpha^k * d[k], k = 0...p-1 ) ). More...
 
value_type deriv () const
 Returns phi.deriv() More...
 
void print_merit_func (std::ostream &out, const std::string &leading_str) const
 Calls phi->print_merit_func(). More...
 

Additional Inherited Members

- Public Member Functions inherited from ConstrainedOptPack::MeritFuncCalc1D
virtual ~MeritFuncCalc1D ()
 

Detailed Description

Adds the ability to compute phi(alpha) at alpha of a given set of vectors.

Computes phi( x = sum( alpha^k * d[k], k = 0...p-1 ) ) where 1 <= p <= 2.

Definition at line 55 of file ConstrainedOptPack_MeritFuncCalc1DQuadratic.hpp.

Member Typedef Documentation

Constructor & Destructor Documentation

ConstrainedOptPack::MeritFuncCalc1DQuadratic::MeritFuncCalc1DQuadratic ( const MeritFuncCalc phi,
size_type  p,
const_VectorWithOp_ptr  d[],
VectorMutable *  x 
)

The only constructor.

Note that *x and *d gets updated as operator()(alpha) is called.

The client must ensure that the memory pointed to by the vectors in d must not be desturbed while this object is in use. To do so may have bad side effects.

Parameters
phi[in] The merit function to use.
p[in] The number of vectors in d[].
d[in] Array (length p) of pointers to the rhs d[] vectors.
x[out] The vector that gets updated.

Preconditions:

  • 1 <= p <= 3
  • d[k]->space().is_compatible(x->space()), for k = 0...p-1

Definition at line 50 of file ConstrainedOptPack_MeritFuncCalc1DQuadratic.cpp.

Member Function Documentation

value_type ConstrainedOptPack::MeritFuncCalc1DQuadratic::operator() ( value_type  alpha) const
virtual

Returns phi( x = sum( alpha^k * d[k], k = 0...p-1 ) ).

Implements ConstrainedOptPack::MeritFuncCalc1D.

Definition at line 67 of file ConstrainedOptPack_MeritFuncCalc1DQuadratic.cpp.

value_type ConstrainedOptPack::MeritFuncCalc1DQuadratic::deriv ( ) const
virtual

Returns phi.deriv()

Implements ConstrainedOptPack::MeritFuncCalc1D.

Definition at line 78 of file ConstrainedOptPack_MeritFuncCalc1DQuadratic.cpp.

void ConstrainedOptPack::MeritFuncCalc1DQuadratic::print_merit_func ( std::ostream &  out,
const std::string &  leading_str 
) const
virtual

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