implements functions needed by transform_vars_permutation.c
More...
#include <stdio.h>
#include <assert.h>
#include "coco.h"
#include "coco_random.c"
#include "suite_bbob_legacy_code.c"
#include <time.h>
|
static int | f_compare_doubles_for_random_permutation (const void *a, const void *b) |
| Comparison function used for sorting. In our case, it serves as a random permutation generator. More...
|
|
static void | coco_compute_random_permutation (size_t *P, long seed, size_t n) |
| generates a random, uniformly sampled, permutation and puts it in P Wassim: move to coco_utilities? More...
|
|
static void | coco_compute_permutation_from_sequence (size_t *P, double *seq, size_t length) |
| generates a permutation by sorting a sequence and puts it in P More...
|
|
static long | coco_random_unif_integer (long lower_bound, long upper_bound, long seed) |
| returns a uniformly distributed integer between lower_bound and upper_bound using seed without using coco_random_new. Move to coco_utilities? More...
|
|
static void | coco_compute_truncated_uniform_swap_permutation (size_t *P, long seed, size_t n, size_t nb_swaps, size_t swap_range) |
| generates a random permutation resulting from nb_swaps truncated uniform swaps of range swap_range missing parameters: dynamic_not_static pool, seems empirically irrelevant for now so dynamic is implemented (simple since no need for tracking indices if swap_range is 0, a random uniform permutation is generated More...
|
|
static size_t * | coco_duplicate_size_t_vector (const size_t *src, const size_t number_of_elements) |
| duplicates a size_t vector More...
|
|
static size_t | coco_get_swap_range (size_t dimension, const char *suite_name) |
| return the swap_range corresponding to the problem in the given suite More...
|
|
size_t | coco_get_nb_swaps (size_t dimension, const char *suite_name) |
| return the number of swaps corresponding to the problem in the given suite More...
|
|
implements functions needed by transform_vars_permutation.c
static void coco_compute_permutation_from_sequence |
( |
size_t * |
P, |
|
|
double * |
seq, |
|
|
size_t |
length |
|
) |
| |
|
static |
generates a permutation by sorting a sequence and puts it in P
static void coco_compute_random_permutation |
( |
size_t * |
P, |
|
|
long |
seed, |
|
|
size_t |
n |
|
) |
| |
|
static |
generates a random, uniformly sampled, permutation and puts it in P Wassim: move to coco_utilities?
static void coco_compute_truncated_uniform_swap_permutation |
( |
size_t * |
P, |
|
|
long |
seed, |
|
|
size_t |
n, |
|
|
size_t |
nb_swaps, |
|
|
size_t |
swap_range |
|
) |
| |
|
static |
generates a random permutation resulting from nb_swaps truncated uniform swaps of range swap_range missing parameters: dynamic_not_static pool, seems empirically irrelevant for now so dynamic is implemented (simple since no need for tracking indices if swap_range is 0, a random uniform permutation is generated
static size_t* coco_duplicate_size_t_vector |
( |
const size_t * |
src, |
|
|
const size_t |
number_of_elements |
|
) |
| |
|
static |
duplicates a size_t vector
size_t coco_get_nb_swaps |
( |
size_t |
dimension, |
|
|
const char * |
suite_name |
|
) |
| |
return the number of swaps corresponding to the problem in the given suite
static size_t coco_get_swap_range |
( |
size_t |
dimension, |
|
|
const char * |
suite_name |
|
) |
| |
|
static |
return the swap_range corresponding to the problem in the given suite
static long coco_random_unif_integer |
( |
long |
lower_bound, |
|
|
long |
upper_bound, |
|
|
long |
seed |
|
) |
| |
|
static |
returns a uniformly distributed integer between lower_bound and upper_bound using seed without using coco_random_new. Move to coco_utilities?
static int f_compare_doubles_for_random_permutation |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
Comparison function used for sorting. In our case, it serves as a random permutation generator.