function.hh File Reference
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <boost/static_assert.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/preprocessor/punctuation/comma.hpp>
#include <roboptim/core/alloc.hh>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <log4cxx/logger.h>
#include <roboptim/core/fwd.hh>
#include <roboptim/core/indent.hh>
#include <roboptim/core/portability.hh>
#include <roboptim/core/detail/utility.hh>
#include <roboptim/core/function.hxx>

Classes

struct  roboptim::GenericFunctionTraits< T >
 GenericFunction traits. More...
class  roboptim::GenericFunction< T >
 Define an abstract mathematical function ( \(C^0\)). More...
struct  roboptim::GenericFunctionTraits< EigenMatrixDense >
 Trait specializing GenericFunction for Eigen dense matrices. More...
struct  roboptim::GenericFunctionTraits< EigenMatrixSparse >
 Trait specializing GenericFunction for Eigen sparse matrices. More...

Namespaces

namespace  roboptim
 

defined(EIGEN_RUNTIME_NO_MALLOC) && !defined(ROBOPTIM_DO_NOT_CHECK_ALLOCATION)


Defines

#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
#define ROBOPTIM_GENERATE_TYPEDEFS_EIGEN_REF(NAME, TYPE)
#define ROBOPTIM_GENERATE_TYPEDEFS_EIGEN_REF_VEC(NAME, TYPE)
#define ROBOPTIM_GENERATE_TYPEDEFS_REF(NAME, TYPE)
#define ROBOPTIM_GENERATE_FWD_REFS(NAME)
#define ROBOPTIM_GENERATE_FWD_REFS_(NAME)
#define ROBOPTIM_GENERATE_TRAITS_REFS_(NAME)
#define ROBOPTIM_GENERATE_TRAITS_REFS_T(NAME, TRAITS)
#define ROBOPTIM_FUNCTION_FWD_TYPEDEFS(PARENT)
#define ROBOPTIM_FUNCTION_FWD_TYPEDEFS_(PARENT)
#define ROBOPTIM_DEFINE_FLAG_TYPE()   typedef unsigned int flag_t
#define ROBOPTIM_ADD_FLAG(FLAG)

Enumerations

enum  roboptim::FunctionFlag {
  roboptim::ROBOPTIM_IS_FUNCTION = 1 << 0,
  roboptim::ROBOPTIM_IS_DIFFERENTIABLE = 1 << 1,
  roboptim::ROBOPTIM_IS_TWICE_DIFFERENTIABLE = 1 << 2,
  roboptim::ROBOPTIM_IS_QUADRATIC = 1 << 3,
  roboptim::ROBOPTIM_IS_NUMERIC_QUADRATIC = 1 << 4,
  roboptim::ROBOPTIM_IS_LINEAR = 1 << 5,
  roboptim::ROBOPTIM_IS_NUMERIC_LINEAR = 1 << 6,
  roboptim::ROBOPTIM_IS_POLYNOMIAL = 1 << 7,
  roboptim::ROBOPTIM_IS_CONSTANT = 1 << 8
}
 Bit flags describing the type of function. More...

Functions

 BOOST_STATIC_ASSERT_MSG (Eigen::ROBOPTIM_STORAGE_ORDER==Eigen::ColMajor||Eigen::ROBOPTIM_STORAGE_ORDER==Eigen::RowMajor,"Wrong storage order provided by ROBOPTIM_STORAGE_ORDER.")
 ROBOPTIM_STORAGE_ORDER.
template<typename T >
std::ostream & roboptim::operator<< (std::ostream &o, const GenericFunction< T > &f)
 Override operator<< to handle function display.
template<typename U , typename V >
boost::shared_ptr< V > roboptim::castInto (boost::shared_ptr< U > &u)
 Cast a shared_ptr of function to a different function type.
template<typename U , typename V >
const boost::shared_ptr< V > roboptim::castInto (const boost::shared_ptr< U > &u)
 Cast a shared_ptr of function to a different function type.

Variables

static const int roboptim::StorageOrder = Eigen::ROBOPTIM_STORAGE_ORDER
 Default matrix storage order.

Define Documentation

#define ROBOPTIM_ADD_FLAG (   FLAG)
Value:
ROBOPTIM_DEFINE_FLAG_TYPE();          \
 /* /// \brief Get the type-checking flag*/     \
 virtual flag_t getFlags() const        \
 {                \
   return flags;            \
 }                \
 /* /// \brief Flag representing the Roboptim Function type*/ \
 static const flag_t flags = parent_t::flags|FLAG
#define ROBOPTIM_DEFINE_FLAG_TYPE ( )    typedef unsigned int flag_t
#define ROBOPTIM_FUNCTION_FWD_TYPEDEFS (   PARENT)
Value:
typedef PARENT parent_t;      \
  typedef parent_t::value_type value_type;  \
  typedef parent_t::size_type size_type;  \
  typedef parent_t::names_t names_t;            \
  ROBOPTIM_GENERATE_FWD_REFS(argument);   \
  ROBOPTIM_GENERATE_FWD_REFS(result);   \
  ROBOPTIM_GENERATE_FWD_REFS(vector);   \
  ROBOPTIM_GENERATE_FWD_REFS(rowVector);    \
  ROBOPTIM_GENERATE_FWD_REFS(matrix)
#define ROBOPTIM_FUNCTION_FWD_TYPEDEFS_ (   PARENT)
Value:
typedef PARENT parent_t;        \
  typedef typename parent_t::value_type value_type; \
  typedef typename parent_t::size_type size_type; \
  typedef typename parent_t::names_t names_t;           \
  ROBOPTIM_GENERATE_FWD_REFS_(argument);    \
  ROBOPTIM_GENERATE_FWD_REFS_(result);      \
  ROBOPTIM_GENERATE_FWD_REFS_(vector);      \
  ROBOPTIM_GENERATE_FWD_REFS_(rowVector);     \
  ROBOPTIM_GENERATE_FWD_REFS_(matrix)
#define ROBOPTIM_GENERATE_FWD_REFS (   NAME)
Value:
typedef parent_t::NAME##_t NAME##_t;        \
  typedef parent_t::NAME##_ref NAME##_ref;      \
  typedef parent_t::const_##NAME##_ref const_##NAME##_ref
#define ROBOPTIM_GENERATE_FWD_REFS_ (   NAME)
Value:
typedef typename parent_t::NAME##_t NAME##_t;       \
  typedef typename parent_t::NAME##_ref NAME##_ref;     \
  typedef typename parent_t::const_##NAME##_ref const_##NAME##_ref
#define ROBOPTIM_GENERATE_TRAITS_REFS_ (   NAME)
Value:
typedef typename GenericFunctionTraits<T>::NAME##_t NAME##_t;   \
  typedef typename GenericFunctionTraits<T>::NAME##_ref NAME##_ref; \
  typedef typename GenericFunctionTraits<T>::const_##NAME##_ref const_##NAME##_ref
#define ROBOPTIM_GENERATE_TRAITS_REFS_T (   NAME,
  TRAITS 
)
Value:
typedef typename GenericFunctionTraits<TRAITS>::NAME##_t NAME##_t;    \
  typedef typename GenericFunctionTraits<TRAITS>::NAME##_ref NAME##_ref;  \
  typedef typename GenericFunctionTraits<TRAITS>::const_##NAME##_ref const_##NAME##_ref
#define ROBOPTIM_GENERATE_TYPEDEFS_EIGEN_REF (   NAME,
  TYPE 
)
Value:
typedef TYPE NAME##_t;          \
  typedef Eigen::Ref<NAME##_t> NAME##_ref;      \
  typedef const Eigen::Ref<const NAME##_t>& const_##NAME##_ref
#define ROBOPTIM_GENERATE_TYPEDEFS_EIGEN_REF_VEC (   NAME,
  TYPE 
)
Value:
typedef TYPE NAME##_t;          \
  typedef Eigen::Ref<NAME##_t, 0, detail::row_vector_stride<StorageOrder>::type> NAME##_ref;      \
  typedef const Eigen::Ref<const NAME##_t, 0, detail::row_vector_stride<StorageOrder>::type>& const_##NAME##_ref
#define ROBOPTIM_GENERATE_TYPEDEFS_REF (   NAME,
  TYPE 
)
Value:
typedef TYPE NAME##_t;        \
  typedef NAME##_t& NAME##_ref;       \
  typedef const NAME##_t& const_##NAME##_ref

Function Documentation

BOOST_STATIC_ASSERT_MSG ( Eigen::ROBOPTIM_STORAGE_ORDER  = =Eigen::ColMajor||Eigen::ROBOPTIM_STORAGE_ORDER==Eigen::RowMajor,
"Wrong storage order provided by ROBOPTIM_STORAGE_ORDER."   
)

ROBOPTIM_STORAGE_ORDER.

Referenced by roboptim::updateSparseBlock().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines