TTTT Analysis
0.1
|
Maps a function over an input vector. More...
#include <value.hpp>
Public Member Functions | |
Map (Function< Ret(ArgTypes...)> &fn, arg_type *arg, const std::string &alias) | |
![]() | |
DerivedValue (const std::string &name, const std::string &alias="") | |
std::vector< Ret > & | get_value () |
Calculate, if necessary, and return the value held by this object. | |
![]() | |
Value (const std::string &name, const std::string &alias="") | |
Private Types | |
typedef Value< std::vector< std::tuple< ArgTypes... > > > | arg_type |
Private Member Functions | |
void | update_value () |
Updates the internal value. More... | |
Private Attributes | |
Function< Ret(ArgTypes...)> & | fn |
arg_type * | arg |
Additional Inherited Members | |
![]() | |
std::vector< Ret > | value |
bool | value_valid |
Maps a function over an input vector.
The input vector must be a vector of tuples, where the the elements of the tuple match the arguments of the function. For example if the function takes two floats as arguments, the tuple should contain two floats. The Value object required by Map will typically be created as a Zip.
|
inlineprivatevirtual |
Updates the internal value.
This function should be overridden by any child class to do the actual work of updating value based on whatever rules the class chooses. Normally, this consists of geting the values from some associated Value objects, doing some calculation on them, and storing the result in value.
Implements fv::DerivedValue< std::vector< Ret > >.