size_t graph_args_save(const struct ArgsDGP *args, FILE *fp)
Saves DGP parameters.
void graph_print(const struct Graph *dgp)
Prints a DGP graph.
char * graph_args_json_export(const struct ArgsDGP *args)
Returns a json formatted string of the DGP parameters.
void graph_param_set_max_t(struct ArgsDGP *args, const int a)
void graph_copy(struct Graph *dest, const struct Graph *src)
Copies a DGP graph.
void graph_free(const struct Graph *dgp)
Frees a DGP graph.
size_t graph_args_load(struct ArgsDGP *args, FILE *fp)
Loads DGP parameters.
void graph_rand(struct Graph *dgp)
Randomises a specified DGP graph.
void graph_param_set_n(struct ArgsDGP *args, const int a)
size_t graph_save(const struct Graph *dgp, FILE *fp)
Writes DGP graph to a file.
void graph_args_init(struct ArgsDGP *args)
Sets DGP parameters to default values.
void graph_json_import(struct Graph *dgp, const struct ArgsDGP *args, const cJSON *json)
Creates a DGP graph from a cJSON object.
void graph_update(const struct Graph *dgp, const double *inputs, const bool reset)
Updates a DGP graph T cycles.
void graph_init(struct Graph *dgp, const struct ArgsDGP *args)
Initialises a new DGP graph.
double graph_output(const struct Graph *dgp, const int IDX)
Returns the current state of a specified node in the graph.
void graph_param_set_n_inputs(struct ArgsDGP *args, const int a)
char * graph_json_export(const struct Graph *dgp)
Returns a json formatted string representation of a DGP graph.
void graph_param_set_max_k(struct ArgsDGP *args, const int a)
size_t graph_load(struct Graph *dgp, FILE *fp)
Reads DGP graph from a file.
char * graph_args_json_import(struct ArgsDGP *args, cJSON *json)
Sets the DGP graph parameters from a cJSON object.
void graph_param_set_evolve_cycles(struct ArgsDGP *args, const bool a)
void graph_reset(const struct Graph *dgp)
Resets the states to their initial state.
bool graph_mutate(struct Graph *dgp)
Mutates a specified DGP graph.
Parameters for initialising DGP graphs.
int max_t
Maximum number of update cycles.
int max_k
Maximum number of connections a node may have.
int n_inputs
Number of inputs to the graph.
int n
Number of nodes in the graph.
bool evolve_cycles
Whether to evolve the number of update cycles.
Dynamical GP graph data structure.
int n_inputs
Number of inputs to the graph.
double * mu
Mutation rates.
int * connectivity
Connectivity map.
double * state
Current state of each node.
double * initial_state
Initial node states.
int t
Number of cycles to run.
bool evolve_cycles
Whether to evolve the number of update cycles.
int max_t
Maximum number of update cycles.
int max_k
Maximum number of connections a node may have.
double * tmp_state
Temporary storage for synchronous update.
double * tmp_input
Temporary storage for updating the graph.
int klen
Length of connectivity map.