|
TuringSim
C++ framework to simulate abstract computing models
|
Build an array at compile time by applying a function. More...
#include <utils/arrayBuilder.h>
Static Public Member Functions | |
| template<typename F > | |
| constexpr static std::array< T, N > | fromFunction (F f) |
Builds an array of size N by filling it with f(0), ..., f(N-1). More... | |
Build an array at compile time by applying a function.
| T | The type of elements in the resulting array. |
| N | The number size of the array. |
Definition at line 16 of file arrayBuilder.h.
|
inlinestaticconstexpr |
Builds an array of size N by filling it with f(0), ..., f(N-1).
| F | the type of the function to apply. It must be a unary function taking a size_t parameter and returning a T. |
| [in] | f | the function to apply. |
Definition at line 31 of file arrayBuilder.h.