Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time > Struct Template Reference

A bundle wrapping a (iterative) function with metadata. More...

#include <func_bundle.hh>

Inheritance diagram for Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time >:
Inheritance graph
[legend]
Collaboration diagram for Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time >:
Collaboration graph
[legend]

Public Member Functions

 ParamFuncBundle (std::string name, Func func, std::string param_name, bool invoke_at_initialization=true, bool invoke_always=true, std::set< Time > times={})
 
 ParamFuncBundle (std::string name, Func func, std::string param_name, std::tuple< bool, bool, std::set< Time > > invoke_times_tuple)
 
- Public Member Functions inherited from Utopia::Models::Environment::FuncBundle::FuncBundle< Func, Time >
 FuncBundle (std::string name, Func func, bool invoke_at_initialization=true, bool invoke_always=true, std::set< Time > times={})
 When to invoke.
 

Public Attributes

std::string param_name
 The name of the parameter to which to apply the function.
 
- Public Attributes inherited from Utopia::Models::Environment::FuncBundle::FuncBundle< Func, Time >
std::string name
 
Func func
 The name of the function.
 
bool invoke_at_initialization
 The function.
 
bool invoke_always
 Whether to invoke at initialization.
 
std::set< Time > times
 Whether to invoke in every timestep.
 

Detailed Description

template<typename Func, typename Time>
struct Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time >

A bundle wrapping a (iterative) function with metadata.

This gathers a function alongside some metadata into a custom construct. The function is ment to be applied within an iterative model.

Constructor & Destructor Documentation

◆ ParamFuncBundle() [1/2]

template<typename Func , typename Time >
Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time >::ParamFuncBundle ( std::string  name,
Func  func,
std::string  param_name,
bool  invoke_at_initialization = true,
bool  invoke_always = true,
std::set< Time >  times = {} 
)
inline
48 {})
49 :
53 {}
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
std::set< Time > times
Whether to invoke in every timestep.
Definition func_bundle.hh:22
bool invoke_always
Whether to invoke at initialization.
Definition func_bundle.hh:21
FuncBundle(std::string name, Func func, bool invoke_at_initialization=true, bool invoke_always=true, std::set< Time > times={})
When to invoke.
Definition func_bundle.hh:24
Func func
The name of the function.
Definition func_bundle.hh:19
std::string name
Definition func_bundle.hh:18
bool invoke_at_initialization
The function.
Definition func_bundle.hh:20
std::string param_name
The name of the parameter to which to apply the function.
Definition func_bundle.hh:44

◆ ParamFuncBundle() [2/2]

template<typename Func , typename Time >
Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time >::ParamFuncBundle ( std::string  name,
Func  func,
std::string  param_name,
std::tuple< bool, bool, std::set< Time > >  invoke_times_tuple 
)
inline
57 :
59 std::get<0>(invoke_times_tuple),
60 std::get<1>(invoke_times_tuple),
61 std::get<2>(invoke_times_tuple))
62 {}

Member Data Documentation

◆ param_name

template<typename Func , typename Time >
std::string Utopia::Models::Environment::FuncBundle::ParamFuncBundle< Func, Time >::param_name

The name of the parameter to which to apply the function.


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