XCSF
1.4.7
XCSF learning classifier system
|
Interface for classifier actions. More...
Go to the source code of this file.
Functions | |
void | action_set (const struct XCSF *xcsf, struct Cl *c) |
Sets a classifier's action functions to the implementations. More... | |
const char * | action_type_as_string (const int type) |
Returns a string representation of an action type from an integer. More... | |
int | action_type_as_int (const char *type) |
Returns the integer representation of an action type given a name. More... | |
void | action_param_defaults (struct XCSF *xcsf) |
Initialises default action parameters. More... | |
char * | action_param_json_export (const struct XCSF *xcsf) |
Returns a json formatted string of the action parameters. More... | |
char * | action_param_json_import (struct XCSF *xcsf, cJSON *json) |
Sets the action parameters from a cJSON object. More... | |
size_t | action_param_save (const struct XCSF *xcsf, FILE *fp) |
Saves action parameters. More... | |
size_t | action_param_load (struct XCSF *xcsf, FILE *fp) |
Loads action parameters. More... | |
void | action_param_free (struct XCSF *xcsf) |
Frees action parameters. More... | |
int | action_param_set_type_string (struct XCSF *xcsf, const char *a) |
void | action_param_set_type (struct XCSF *xcsf, const int a) |
void action_param_defaults | ( | struct XCSF * | xcsf | ) |
Initialises default action parameters.
[in] | xcsf | The XCSF data structure. |
Definition at line 91 of file action.c.
References act_neural_param_defaults(), ACT_TYPE_INTEGER, and action_param_set_type().
Referenced by param_init().
void action_param_free | ( | struct XCSF * | xcsf | ) |
Frees action parameters.
[in] | xcsf | The XCSF data structure. |
Definition at line 184 of file action.c.
References layer_args_free().
Referenced by param_free().
char* action_param_json_export | ( | const struct XCSF * | xcsf | ) |
Returns a json formatted string of the action parameters.
[in] | xcsf | XCSF data structure. |
Definition at line 103 of file action.c.
References ACT_TYPE_NEURAL, action_type_as_string(), layer_args_json_export(), and ArgsAct::type.
Referenced by param_json_export().
char* action_param_json_import | ( | struct XCSF * | xcsf, |
cJSON * | json | ||
) |
Sets the action parameters from a cJSON object.
[in,out] | xcsf | XCSF data structure. |
[in] | json | cJSON object. |
Definition at line 131 of file action.c.
References act_neural_param_json_import(), ACT_TYPE_INTEGER, and ACT_TYPE_NEURAL.
Referenced by param_json_import_action().
size_t action_param_load | ( | struct XCSF * | xcsf, |
FILE * | fp | ||
) |
Loads action parameters.
[in] | xcsf | The XCSF data structure. |
[in] | fp | Pointer to the output file. |
Definition at line 170 of file action.c.
References ArgsAct::largs, layer_args_load(), and ArgsAct::type.
Referenced by param_load().
size_t action_param_save | ( | const struct XCSF * | xcsf, |
FILE * | fp | ||
) |
Saves action parameters.
[in] | xcsf | The XCSF data structure. |
[in] | fp | Pointer to the output file. |
Definition at line 154 of file action.c.
References ArgsAct::largs, layer_args_save(), and ArgsAct::type.
Referenced by param_save().
void action_param_set_type | ( | struct XCSF * | xcsf, |
const int | a | ||
) |
Definition at line 202 of file action.c.
Referenced by action_param_defaults().
int action_param_set_type_string | ( | struct XCSF * | xcsf, |
const char * | a | ||
) |
Definition at line 192 of file action.c.
References ACT_TYPE_INVALID, action_type_as_int(), and ArgsAct::type.
Referenced by param_json_import_action().
Sets a classifier's action functions to the implementations.
[in] | xcsf | The XCSF data structure. |
[in] | c | The classifier to set. |
Definition at line 35 of file action.c.
References act_integer_vtbl, act_neural_vtbl, ACT_TYPE_INTEGER, ACT_TYPE_NEURAL, and Cl::act_vptr.
Referenced by cl_load(), and cl_rand().
int action_type_as_int | ( | const char * | type | ) |
Returns the integer representation of an action type given a name.
[in] | type | String representation of a condition type. |
Definition at line 75 of file action.c.
References ACT_STRING_INTEGER, ACT_STRING_NEURAL, ACT_TYPE_INTEGER, ACT_TYPE_INVALID, and ACT_TYPE_NEURAL.
Referenced by act_json_import(), and action_param_set_type_string().
const char* action_type_as_string | ( | const int | type | ) |
Returns a string representation of an action type from an integer.
[in] | type | Integer representation of an action type. |
Definition at line 56 of file action.c.
References ACT_STRING_INTEGER, ACT_STRING_NEURAL, ACT_TYPE_INTEGER, and ACT_TYPE_NEURAL.
Referenced by act_json_import(), and action_param_json_export().