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) | |
Public Member Functions inherited from fv::DerivedValue< std::vector< Ret > > | |
DerivedValue (const std::string &name, const std::string &alias="") | |
void | log () |
std::vector< Ret > & | get_value () |
Calculate, if necessary, and return the value held by this object. | |
Public Member Functions inherited from fv::Value< std::vector< Ret > > | |
Value (const std::string &name, const std::string &alias="") | |
void | enable_logging (const std::function< std::string(std::vector< Ret >)> &value_to_string=[](std::vector< Ret >){return "";}) |
void | disable_logging () |
Static Public Member Functions | |
static std::string | fmt_name (Function< Ret(ArgTypes...)> &fn, arg_type *arg) |
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 | |
Protected Attributes inherited from fv::DerivedValue< std::vector< Ret > > | |
std::vector< Ret > | value |
Protected Attributes inherited from fv::Value< std::vector< Ret > > | |
std::function< std::string(std::vector< Ret >)> | value_to_string |
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 > >.
Definition at line 698 of file value.hpp.