darfix.tests.test_ga#

Functions

ga()

test_crossover_even(ga)

Tests the crossover method when the length of the population is even.

test_crossover_odd(ga)

Tests the crossover method when the length of the population is odd.

test_fit_best(ga)

Tests correct shape of the chromosomes after fit.

test_fit_scores(ga)

Tests the correct length of the score after fit.

test_fitness(ga)

Tests the fitness method.

test_generate(ga)

Tests the generate method.

test_initialize(ga)

Tests the initialize method.

test_mutate(ga)

Tests the mutate method.

test_select(ga)

Tests the select method.

test_zero_shift_ga(ga)

Tests the genetic algorithm with a given optimal_shift of 0 and no normal distribution.