population_set_replacement_method: New function.
[libpopulation.git] / src / population.h
index 64b3d8f..cc513d4 100644 (file)
@@ -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,8 +35,14 @@ 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