A pool of functions that will be processed together. More...
#include <roboptim/core/function-pool.hh>
 
  
 | Public Types | |
| typedef F | pool_t | 
| Function type of the pool.  More... | |
| typedef detail::list_converter < FLIST >::type | functionTypeList_t | 
| typedef detail::shared_ptr_variant < functionTypeList_t >::type | function_t | 
| Type of the functions in the pool.  More... | |
| typedef std::vector< function_t > | functionList_t | 
| List of functions that will populate the pool.  More... | |
| typedef F | callback_t | 
| Type of the callback function (where the computation happens).  More... | |
| typedef boost::shared_ptr < callback_t > | callback_ptr | 
| Public Member Functions | |
| ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (pool_t) | |
| FunctionPool (const callback_ptr callback, const functionList_t &functions, const std::string &name="") | |
| FunctionPool constructor.  More... | |
| virtual | ~FunctionPool () | 
| Virtual destructor.  More... | |
| virtual void | impl_compute (result_ref result, const_argument_ref x) const | 
| virtual void | impl_gradient (gradient_ref gradient, const_argument_ref argument, size_type functionId=0) const | 
| virtual void | impl_jacobian (jacobian_ref jacobian, const_argument_ref arg) const | 
| virtual std::ostream & | print (std::ostream &) const | 
| Overriden print function for pools.  More... | |
| Static Public Member Functions | |
| static size_type | listInputSize (const functionList_t &functions) | 
| Get the input size from the function list.  More... | |
| static size_type | listOutputSize (const functionList_t &functions) | 
| Get the output size from the function list.  More... | |
A pool of functions that will be processed together.
This class provides a way to regroup functions that depend on the same "computation engine", for instance a simulator that generates some data, then each function of the pool can simply read the computed data (which could be done in parallel).
TODO: the actual type of the FunctionPool should depend on the list of constraints that are supported. We could imagine using a metaprogramming version of LCA (lowest common ancestor) to find the Function type that will best match the list. In hybrid scenarios where we have both differentiable and non-differentiable functions, two pools sharing the same callback should probably be used. For now, we will rely on a user-provided function type.
| F | type of the pool. | 
| FLIST | list of valid function types. | 
| typedef boost::shared_ptr<callback_t> roboptim::FunctionPool< F, FLIST >::callback_ptr | 
| typedef F roboptim::FunctionPool< F, FLIST >::callback_t | 
Type of the callback function (where the computation happens).
| typedef detail::shared_ptr_variant<functionTypeList_t>::type roboptim::FunctionPool< F, FLIST >::function_t | 
Type of the functions in the pool.
| typedef std::vector<function_t> roboptim::FunctionPool< F, FLIST >::functionList_t | 
List of functions that will populate the pool.
| typedef detail::list_converter<FLIST>::type roboptim::FunctionPool< F, FLIST >::functionTypeList_t | 
| typedef F roboptim::FunctionPool< F, FLIST >::pool_t | 
Function type of the pool.
Note: this will be set by LCA called on the function type list.
| 
 | explicit | 
FunctionPool constructor.
| callback | callback function for the engine. | 
| functions | functions of the pool. | 
| name | name of the pool. | 
| 
 | virtual | 
Virtual destructor.
| 
 | virtual | 
| 
 | virtual | 
| 
 | virtual | 
| 
 | static | 
Get the input size from the function list.
| 
 | static | 
Get the output size from the function list.
| 
 | virtual | 
Overriden print function for pools.
References roboptim::decindent(), and roboptim::incindent().
| roboptim::FunctionPool< F, FLIST >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | pool_t | ) |