#include <optimization_bounds2constraint.h>
Classes | |
class | vector_iterator |
Public Member Functions | |
Bound2ConstraintFunctor (bound_functor const &bounds, bool const &is_lower) | |
template<typename vector_type > | |
T | 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. |
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.
typedef bound_functor::vector_iterator OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::bound_iterator [protected] |
typedef OpenTissue::math::ValueTraits<T> OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::value_traits [protected] |
typedef T OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::value_type [protected] |
OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::Bound2ConstraintFunctor | ( | bound_functor const & | bounds, | |
bool const & | is_lower | |||
) | [inline] |
T OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::operator() | ( | vector_type const & | x, | |
size_t const & | i | |||
) | const [inline] |
vector_iterator OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::partial_begin | ( | size_t const & | i | ) | const [inline] |
vector_iterator OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::partial_end | ( | size_t const & | i | ) | const [inline] |
size_t OpenTissue::math::optimization::detail::Bound2ConstraintFunctor< T, bound_functor >::size | ( | ) | const [inline] |
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.
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.