This code takes the free parameters for the logistic equation and returns a function that takes a templated time variable and returns a value of the same type at time t.
Input:
The free parameters that define the logistic equation: \( \{ \gamma, \beta, P_o \} \), as well as a type T that the function should be defined over.
Output:
A function that takes a parameter t of type T and returns the value of the specified logisic equation evaluated at t.
Usage/Example:
To use this function, you have to include it in the file you need to call it from.
Output:
Implementation/Code:
I made this function as abstract as possible. I probably could have gone with partial function application to bind \( \gamma \), \( \beta \), and \( P_o \), but C++ does not have a very clean way of doing this yet. Instead, I created a small factory for the logistic equation that took the free parameters and returns a function that is a logistic map.