Provides utility methods to describe the input format of a function. More...
#include <roboptim/core/detail/structured-input.hh>
Public Types | |
typedef Eigen::Ref< const typename FuncType::argument_t > ::ConstSegmentReturnType | ConstSegment |
return type of the getInputBlock() method More... | |
Public Member Functions | |
void | addBlock (size_t size) |
Adds a new block of input to the function. More... | |
size_t | getNumBlocks () const |
Returns the number of blocks defined by the function. More... | |
ConstSegment | getInputBlock (typename FuncType::const_argument_ref input, size_t blockInd) const |
Reads a specified block of data from an input argument. More... | |
Provides utility methods to describe the input format of a function.
Inheriting from this class will allow a function to define "blocks" of input. You can then retrieve a specific block from the whole input, or the specific part of the jacobian depending on this block.
To inherit from this class, please specify as the template argument the roboptim function type of the function (Function, DifferentiableFunction, LinearFunction, et cetera)
typedef Eigen::Ref<const typename FuncType::argument_t>::ConstSegmentReturnType roboptim::detail::StructuredInput< FuncType >::ConstSegment |
return type of the getInputBlock() method
void roboptim::detail::StructuredInput< U >::addBlock | ( | size_t | size | ) |
Adds a new block of input to the function.
size | size of the block to add |
References roboptim::detail::BlockProvider::blocks.
StructuredInput< U >::ConstSegment roboptim::detail::StructuredInput< U >::getInputBlock | ( | typename U::const_argument_ref | input, |
size_t | blockInd | ||
) | const |
Reads a specified block of data from an input argument.
input | the input data to be read |
blockInd | the index of the block to be read |
References roboptim::detail::BlockProvider::blocks.
size_t roboptim::detail::StructuredInput< U >::getNumBlocks | ( | ) | const |
Returns the number of blocks defined by the function.
References roboptim::detail::BlockProvider::blocks.