Classes | Public Member Functions | Protected Types | Protected Attributes

OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor > Class Template Reference

#include <optimization_bounds2constraint.h>

List of all members.

Classes

class  vector_iterator

Public Member Functions

 Bound2ConstraintFunctor (bound_functor const &bounds, bool const &is_lower)
template<typename vector_type >
operator() (vector_type const &x, size_t const &i) const
size_t size () const
vector_iterator partial_begin (size_t const &i) const
vector_iterator partial_end (size_t const &i) const

Protected Types

typedef T value_type
typedef
OpenTissue::math::ValueTraits
< T > 
value_traits
typedef
bound_functor::vector_iterator 
bound_iterator

Protected Attributes

bound_functor const & m_bounds
 The bounds functor. This could be either a lower or an upper bound.
bool m_is_lower
 Boolean flag, if set to true then the constraint functions corresponds to a lower bound otherwise the constraint function corresponds to an upper bound.

Detailed Description

template<typename T, typename bound_functor>
class OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >

Bound to Constraint Conversion Functor. In many cases one has bounded problems that is to say that we have some problem subject to the constraints

x l x u

Or more generally the bounds could be dependent on x, that is

x l(x) x u(x)

In some problems the bound functions l(x) and u(x) would be passed directly to some solver. However, in other cases a solver or method may work with a more general ``constraint'' function. That is we can rewrite either the lower or upper bounds into a inequality constraint of the type c(x) 0,

c(x) = u(x) - x 0 or c(x) = x - l(x) 0

This is the purpose of the template class, it takes a bound function and makes it behave as a constraint function.


Member Typedef Documentation

template<typename T, typename bound_functor>
typedef bound_functor::vector_iterator OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::bound_iterator [protected]
template<typename T, typename bound_functor>
typedef OpenTissue::math::ValueTraits<T> OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::value_traits [protected]
template<typename T, typename bound_functor>
typedef T OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::value_type [protected]

Constructor & Destructor Documentation

template<typename T, typename bound_functor>
OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::Bound2ConstraintFunctor ( bound_functor const &  bounds,
bool const &  is_lower 
) [inline]

Member Function Documentation

template<typename T, typename bound_functor>
template<typename vector_type >
T OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::operator() ( vector_type const &  x,
size_t const &  i 
) const [inline]
template<typename T, typename bound_functor>
vector_iterator OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::partial_begin ( size_t const &  i  )  const [inline]
template<typename T, typename bound_functor>
vector_iterator OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::partial_end ( size_t const &  i  )  const [inline]
template<typename T, typename bound_functor>
size_t OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::size (  )  const [inline]

Member Data Documentation

template<typename T, typename bound_functor>
bound_functor const& OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::m_bounds [protected]

The bounds functor. This could be either a lower or an upper bound.

template<typename T, typename bound_functor>
bool OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::m_is_lower [protected]

Boolean flag, if set to true then the constraint functions corresponds to a lower bound otherwise the constraint function corresponds to an upper bound.


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