roboptim::detail::StructuredInput< FuncType > Class Template Reference

Provides utility methods to describe the input format of a function. More...

#include <roboptim/core/detail/structured-input.hh>

List of all members.

Public Types

typedef Eigen::Ref< const
typename FuncType::argument_t >
::ConstSegmentReturnType 
ConstSegment
 return type of the getInputBlock() method

Public Member Functions

void addBlock (size_t size)
 Adds a new block of input to the function.
size_t getNumBlocks () const
 Returns the number of blocks defined by the function.
ConstSegment getInputBlock (typename FuncType::const_argument_ref input, size_t blockInd) const
 Reads a specified block of data from an input argument.

Detailed Description

template<typename FuncType>
class roboptim::detail::StructuredInput< FuncType >

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)


Member Typedef Documentation

template<typename FuncType>
typedef Eigen::Ref<const typename FuncType::argument_t>::ConstSegmentReturnType roboptim::detail::StructuredInput< FuncType >::ConstSegment

return type of the getInputBlock() method


Member Function Documentation

template<typename U >
void roboptim::detail::StructuredInput< U >::addBlock ( size_t  size)

Adds a new block of input to the function.

Parameters:
sizesize of the block to add

References roboptim::detail::BlockProvider::blocks.

template<typename U>
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.

Parameters:
inputthe input data to be read
blockIndthe index of the block to be read

References roboptim::detail::BlockProvider::blocks.

template<typename U >
size_t roboptim::detail::StructuredInput< U >::getNumBlocks ( ) const

Returns the number of blocks defined by the function.

References roboptim::detail::BlockProvider::blocks.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines