fv::Map< Ret(ArgTypes...)> Class Template Reference

Maps a function over an input vector. More...

`#include <value.hpp>`

Inheritance diagram for fv::Map< Ret(ArgTypes...)>:
[legend]
Collaboration diagram for fv::Map< Ret(ArgTypes...)>:
[legend]

## 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

## Detailed Description

### template<typename Ret, typename... ArgTypes>
class fv::Map< Ret(ArgTypes...)>

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.

Definition at line 692 of file value.hpp.

## Member Function Documentation

## update_value()

template<typename Ret , typename... ArgTypes>

void fv::Map< Ret(ArgTypes...)>::update_value | ( |  | ) |

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.

Here is the call graph for this function:

The documentation for this class was generated from the following file:

- /home/caleb/Sources/TTTT/filval/value.hpp