+int population_set_replacement_method (population_t *p, int method) /* {{{ */
+{
+ int status = 0;
+
+ if (p == NULL)
+ return (EINVAL);
+
+ pthread_mutex_lock (&p->lock);
+
+ if (method == POPULATION_REPLACEMENT_EXPLOIT)
+ p->flags &= ~POPULATION_FLAG_EXPLORE;
+ else if (method == POPULATION_REPLACEMENT_EXPLORE)
+ p->flags |= POPULATION_FLAG_EXPLORE;
+ else
+ status = EINVAL;
+
+ pthread_mutex_unlock (&p->lock);
+
+ return (0);
+} /* }}} int population_set_replacement_method */
+