Glauber Dynamics in C
Simulation for Glauber Dynamics written in C11
glauber_dynamics.h
Go to the documentation of this file.
1
4#include "pcg_variants.h"
5#include "update_rules.h" // contains weightedgraph.h
6
20typedef struct arguments {
21 int silent;
22 int do_init;
24 int n;
25 int d;
27 int width;
28 int height;
29 int dpi;
31 double alpha;
34 /* string options */
35 char *init_fname;
36 char *output;
38
49void glauber_dynamics(graph *init_state, update_rule graph_update, int threshold_time, arguments *args);
struct arguments arguments
Typedef of the arguments struct.
void glauber_dynamics(graph *init_state, update_rule graph_update, int threshold_time, arguments *args)
Do a glauber evolution on init_state using the provided update rule.
Definition: glauber_dynamics.c:44
Struct containing the results of the inline command arguments.
Definition: glauber_dynamics.h:20
int d
Default: 2.
Definition: glauber_dynamics.h:25
double alpha
Default: 0.5.
Definition: glauber_dynamics.h:31
char * init_fname
Definition: glauber_dynamics.h:35
double frame_density
Default: 1.
Definition: glauber_dynamics.h:32
int do_init
Goes to 1 if -i is mentioned (even without fname) Default: 0.
Definition: glauber_dynamics.h:22
int penwidth
Default: 10.
Definition: glauber_dynamics.h:30
int width
Default: 5.
Definition: glauber_dynamics.h:27
int max_time
Default: 10000.
Definition: glauber_dynamics.h:26
int dpi
Default: 200.
Definition: glauber_dynamics.h:29
int silent
Default: 0.
Definition: glauber_dynamics.h:21
char * output
Definition: glauber_dynamics.h:36
int height
Default: 5.
Definition: glauber_dynamics.h:28
int n
Default: 10.
Definition: glauber_dynamics.h:24
The graph struct containing the pointers to edges and vertices.
Definition: weightedgraph.h:15
Define a general update_rule class and contains examples for them.
void(* update_rule)(graph *, int, double, pcg32_random_t *)
The update_rule function type to which all update rules should adhere.
Definition: update_rules.h:24