17 #include <core/stringify.h> 24 constexpr
int kMaxFunctionArity = 2;
26 enum FunctionId : int16_t {
28 #define FN_DEF(id, name, arity, category) id, 29 #include "functions_table.def" 33 constexpr
int kFunctionCount =
static_cast<int>(FunctionId::LastEntry);
35 inline auto customStringify(core::TypeTag<FunctionId>) {
38 #define FN_DEF(id, name, arity, category) { FunctionId::id, #name }, 39 #include "functions_table.def" 44 enum class FunctionCategory {
46 TranscendentalConstant,
62 const char*
const name;
64 const FunctionCategory category;
67 constexpr FunctionDef kFunctionDef[kFunctionCount] = {
69 #define FN_DEF(id, name, arity, category) \ 70 { id, #name, (arity), FunctionCategory::category }, 71 #include "functions_table.def" Cartesian Genetic Programming (CGP)
Definition: brain.cpp:25
Handles types with a fixed, known set of values (enumerations for example)
Definition: stringify.h:85
const Stringify< T > * stringify()
Returns the stringifier for type T.
Definition: stringify.h:166