TMB Documentation  v1.9.11
List of all members
TMBad::StdWrap< Functor, InterfaceVector > Struct Template Reference

Interoperability with other vector classes. More...

#include <TMBad.hpp>

Detailed Description

template<class Functor, class InterfaceVector>
struct TMBad::StdWrap< Functor, InterfaceVector >

Interoperability with other vector classes.

The TMBad interface can handle vector to vector mappings specified as functors. The evaluation operator is assumed to take std::vector as both input and output.

However, it may be that our functor is implemeted using an other vector class. In this case the StdWrap can help by automatically adding the std::vector evaluation operator. To make it work one must make sure that conversion operators exist for other, i.e. CTOR and conversion methods must be implemented for the vector class:

other(const std::vector<T> &x);
other::operator std::vector<T>();

Then one can proceed by

Functor F;
StdWrap<Functor, other> Fnew(F);
other x;
ADFun<> (Fnew, x);

Definition at line 57 of file TMBad.hpp.


The documentation for this struct was generated from the following file:
License: GPL v2