Beispiel #1
0
def test_all_ones_maps_to_max():
    assert(bool2double([1, 1, 1, 1, 1, 1, 1, 1], 0, 15) == 15)
Beispiel #2
0
def test_long_chromosomes_all_ones_maps_to_max():
    assert(bool2double([1]*256, 0, 100) == 100)
Beispiel #3
0
def test_zero_maps_to_zero():
    assert(bool2double([0, 0, 0, 0, 0, 0, 0, 0], 0, 100) == 0)