X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpopulation.h;h=cc513d4f0a4b652ca7bd45e19aa8ec96cc349d90;hb=HEAD;hp=a512b4093494a1853ed3dd531c926ce104eda0a7;hpb=00bb95ea0c77d776efebda521c57b8d272e2d908;p=libpopulation.git diff --git a/src/population.h b/src/population.h index a512b40..cc513d4 100644 --- a/src/population.h +++ b/src/population.h @@ -24,7 +24,8 @@ typedef struct population_s population_t; /* * Constructor and destructor */ -population_t *population_create (pi_rate_f rate, pi_copy_f copy, pi_free_f f); +population_t *population_create (pi_rate_f rate, + pi_copy_f copy, pi_free_f f); void population_destroy (population_t *p); /* @@ -34,6 +35,15 @@ int population_set_size (population_t *p, size_t population_size); int population_set_serialization (population_t *p, pi_serialize_f serialize, pi_unserialize_f unserialize); +#define POPULATION_REPLACEMENT_EXPLOIT 1 +#define POPULATION_REPLACEMENT_EXPLORE 2 +int population_set_replacement_method (population_t *p, int method); + +#define POPULATION_DEFAULT_PORT "46835" +int population_add_peer (population_t *p, const char *node, const char *port); +int population_start_listen_thread (population_t *p, + const char *node, const char *port); + /* * Methods */