Replicator Populations



This is a shortcut for a Population struct.


This is a shortcut for a PopCollection struct.

struct Population

This struct holds the data relevant to a single replicator population

int Population.size

This member determines how many entries are in the Population.proportions array.

double* Population.proportions

This member holds the population proportions.

struct PopCollection

This struct holds a collection of population_t structs.

int PopCollection.size

This determines how many populations are collected.

int* PopCollection.pop_sizes

This is an array of the sizes of each of the populations collected.

popcollection_t** PopCollection.populations

This is an array of the populations.



population_t * Population_create(int size)
void Population_destroy(population_t *pop)
int Population_equal(population_t *pop1, population_t *pop2, double effective_zero)
void Population_copy(population_t *target, population_t *source)
void Population_randomize(population_t *pop)
void Population_serialize(population_t *pop, FILE * target_file)
population_t * Population_deserialize(FILE * source_file)


popcollection_t * PopCollection_create(int num_pops, int *sizes)
popcollection_t * PopCollection_clone(popcollection_t *original)
void PopCollection_destroy(popcollection_t *coll)
int PopCollection_equal(popcollection_t *coll1, popcollection_t *coll2, double effective_zero)
void PopCollection_copy(popcollection_t *target, popcollection_t *source)
void PopCollection_randomize(popcollection_t *coll)
void PopCollection_serialize(popcollection_t *coll, FILE * target_file)
popcollection_t * PopCollection_deserialize(FILE * source_file)