From 3a6485b361a724db0e5fa902c105dbd9d95d2a8f Mon Sep 17 00:00:00 2001 From: SevgiAkten Date: Fri, 15 Nov 2024 12:04:06 +0300 Subject: [PATCH] (#74) Use absolute imports for better compatibility. --- pycellga/individual.py | 2 +- pycellga/mutation/bit_flip_mutation.py | 4 +- pycellga/mutation/byte_mutation.py | 6 +- pycellga/mutation/byte_mutation_random.py | 6 +- pycellga/mutation/float_uniform_mutation.py | 6 +- pycellga/mutation/insertion_mutation.py | 6 +- pycellga/mutation/shuffle_mutation.py | 6 +- pycellga/mutation/swap_mutation.py | 6 +- pycellga/mutation/two_opt_mutation.py | 6 +- pycellga/optimizer.py | 62 +++++++++---------- pycellga/population.py | 10 +-- .../single_objective/continuous/ackley.py | 2 +- .../single_objective/continuous/bentcigar.py | 2 +- .../continuous/bohachevsky.py | 2 +- .../continuous/chichinadze.py | 2 +- .../single_objective/continuous/dropwave.py | 2 +- .../single_objective/continuous/fms.py | 2 +- .../single_objective/continuous/griewank.py | 2 +- .../single_objective/continuous/holzman.py | 2 +- .../single_objective/continuous/levy.py | 2 +- .../single_objective/continuous/matyas.py | 2 +- .../single_objective/continuous/pow.py | 2 +- .../single_objective/continuous/powell.py | 2 +- .../single_objective/continuous/rastrigin.py | 2 +- .../single_objective/continuous/rosenbrock.py | 2 +- .../continuous/rothellipsoid.py | 2 +- .../single_objective/continuous/schaffer.py | 2 +- .../single_objective/continuous/schaffer2.py | 2 +- .../single_objective/continuous/schwefel.py | 2 +- .../single_objective/continuous/sphere.py | 2 +- .../continuous/styblinskitang.py | 2 +- .../continuous/sumofdifferentpowers.py | 2 +- .../single_objective/continuous/threehumps.py | 2 +- .../single_objective/continuous/zakharov.py | 2 +- .../single_objective/continuous/zettle.py | 2 +- .../discrete/binary/count_sat.py | 2 +- .../single_objective/discrete/binary/ecc.py | 2 +- .../single_objective/discrete/binary/fms.py | 2 +- .../discrete/binary/maxcut100.py | 2 +- .../discrete/binary/maxcut20_01.py | 2 +- .../discrete/binary/maxcut20_09.py | 2 +- .../single_objective/discrete/binary/mmdp.py | 2 +- .../discrete/binary/one_max.py | 2 +- .../single_objective/discrete/binary/peak.py | 2 +- .../discrete/permutation/tsp.py | 2 +- .../recombination/arithmetic_crossover.py | 6 +- pycellga/recombination/blxalpha_crossover.py | 6 +- .../recombination/byte_one_point_crossover.py | 4 +- .../recombination/byte_uniform_crossover.py | 6 +- pycellga/recombination/flat_crossover.py | 6 +- pycellga/recombination/linear_crossover.py | 6 +- pycellga/recombination/one_point_crossover.py | 6 +- pycellga/recombination/pmx_crossover.py | 6 +- pycellga/recombination/two_point_crossover.py | 6 +- .../recombination/unfair_avarage_crossover.py | 6 +- pycellga/recombination/uniform_crossover.py | 6 +- .../selection/roulette_wheel_selection.py | 4 +- pycellga/selection/tournament_selection.py | 4 +- pycellga/tests/test_ackley.py | 2 +- pycellga/tests/test_arithmetic_crossover.py | 6 +- pycellga/tests/test_bentcigar_function.py | 2 +- pycellga/tests/test_bit_flip_mutation.py | 6 +- pycellga/tests/test_blxalpha_crossover.py | 6 +- pycellga/tests/test_bohachevsky.py | 2 +- pycellga/tests/test_byte_mutation.py | 6 +- pycellga/tests/test_byte_mutation_random.py | 6 +- .../tests/test_byte_one_point_crossover.py | 6 +- pycellga/tests/test_byte_operators.py | 2 +- pycellga/tests/test_byte_uniform_crossover.py | 6 +- pycellga/tests/test_chichinadze_function.py | 2 +- pycellga/tests/test_compact_13.py | 2 +- pycellga/tests/test_compact_21.py | 2 +- pycellga/tests/test_compact_25.py | 2 +- pycellga/tests/test_compact_9.py | 2 +- pycellga/tests/test_count_sat.py | 2 +- pycellga/tests/test_dropwave_function.py | 2 +- pycellga/tests/test_ecc.py | 2 +- pycellga/tests/test_flat_crossover.py | 6 +- pycellga/tests/test_float_uniform_mutation.py | 6 +- pycellga/tests/test_fms.py | 2 +- pycellga/tests/test_grid.py | 2 +- pycellga/tests/test_griewank_function.py | 2 +- pycellga/tests/test_holzman_function.py | 2 +- pycellga/tests/test_individual.py | 2 +- pycellga/tests/test_insertion_mutation.py | 6 +- pycellga/tests/test_levy_function.py | 2 +- pycellga/tests/test_linear_5.py | 2 +- pycellga/tests/test_linear_9.py | 2 +- pycellga/tests/test_linear_crossover.py | 6 +- pycellga/tests/test_matyas_function.py | 2 +- pycellga/tests/test_maxcut100.py | 2 +- pycellga/tests/test_maxcut20_01.py | 2 +- pycellga/tests/test_maxcut20_09.py | 2 +- pycellga/tests/test_mmdp.py | 2 +- pycellga/tests/test_one_max.py | 2 +- pycellga/tests/test_one_point_crossover.py | 6 +- pycellga/tests/test_optimizer_alpha_cga.py | 2 +- pycellga/tests/test_optimizer_ccga.py | 2 +- pycellga/tests/test_optimizer_cga.py | 2 +- pycellga/tests/test_optimizer_mccga.py | 2 +- pycellga/tests/test_optimizer_sync_cga.py | 2 +- pycellga/tests/test_peak.py | 2 +- pycellga/tests/test_pmx_crossover.py | 6 +- pycellga/tests/test_population.py | 12 ++-- pycellga/tests/test_pow_function.py | 2 +- pycellga/tests/test_powell_function.py | 2 +- pycellga/tests/test_rastrigin.py | 2 +- pycellga/tests/test_rosenbrock.py | 2 +- pycellga/tests/test_rothellipsoid_function.py | 2 +- .../tests/test_roulette_wheel_selection.py | 8 +-- pycellga/tests/test_schaffer2_function.py | 2 +- pycellga/tests/test_schaffer_function.py | 2 +- pycellga/tests/test_schwefel.py | 2 +- pycellga/tests/test_shuffle_mutation.py | 6 +- pycellga/tests/test_sphere.py | 2 +- .../tests/test_styblinskitang_function.py | 2 +- .../test_sumofdifferentpowers_function.py | 2 +- pycellga/tests/test_swap_mutation.py | 6 +- pycellga/tests/test_threehumps_function.py | 2 +- pycellga/tests/test_tournament_selection.py | 8 +-- pycellga/tests/test_tsp.py | 2 +- pycellga/tests/test_two_opt_mutation.py | 6 +- pycellga/tests/test_two_point_crossover.py | 6 +- .../tests/test_unfair_average_crossover.py | 6 +- pycellga/tests/test_uniform_crossover.py | 6 +- pycellga/tests/test_zakharov_function.py | 2 +- pycellga/tests/test_zettle_function.py | 2 +- 127 files changed, 248 insertions(+), 248 deletions(-) diff --git a/pycellga/individual.py b/pycellga/individual.py index dc1ebae..2fa3cf7 100644 --- a/pycellga/individual.py +++ b/pycellga/individual.py @@ -2,7 +2,7 @@ from numpy import random import numpy as np import random as rd -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class GeneType(Enum): diff --git a/pycellga/mutation/bit_flip_mutation.py b/pycellga/mutation/bit_flip_mutation.py index 5e67003..adbe745 100644 --- a/pycellga/mutation/bit_flip_mutation.py +++ b/pycellga/mutation/bit_flip_mutation.py @@ -1,7 +1,7 @@ import numpy as np from individual import * -from problems.abstract_problem import AbstractProblem -from mutation.mutation_operator import MutationOperator +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.mutation_operator import MutationOperator class BitFlipMutation(MutationOperator): """ diff --git a/pycellga/mutation/byte_mutation.py b/pycellga/mutation/byte_mutation.py index 2cd81e9..24055c4 100644 --- a/pycellga/mutation/byte_mutation.py +++ b/pycellga/mutation/byte_mutation.py @@ -1,8 +1,8 @@ import numpy as np -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem import struct -from mutation.mutation_operator import MutationOperator +from pycellga.mutation.mutation_operator import MutationOperator class ByteMutation(MutationOperator): """ diff --git a/pycellga/mutation/byte_mutation_random.py b/pycellga/mutation/byte_mutation_random.py index 45f6b2b..6694b3d 100644 --- a/pycellga/mutation/byte_mutation_random.py +++ b/pycellga/mutation/byte_mutation_random.py @@ -1,8 +1,8 @@ import numpy as np -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem import struct -from mutation.mutation_operator import MutationOperator +from pycellga.mutation.mutation_operator import MutationOperator class ByteMutationRandom(MutationOperator): """ diff --git a/pycellga/mutation/float_uniform_mutation.py b/pycellga/mutation/float_uniform_mutation.py index 3f7b990..8c753d1 100644 --- a/pycellga/mutation/float_uniform_mutation.py +++ b/pycellga/mutation/float_uniform_mutation.py @@ -1,7 +1,7 @@ import random -from individual import * -from problems.abstract_problem import AbstractProblem -from mutation.mutation_operator import MutationOperator +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.mutation_operator import MutationOperator class FloatUniformMutation(MutationOperator): """ diff --git a/pycellga/mutation/insertion_mutation.py b/pycellga/mutation/insertion_mutation.py index aeab5bf..172bd11 100644 --- a/pycellga/mutation/insertion_mutation.py +++ b/pycellga/mutation/insertion_mutation.py @@ -1,7 +1,7 @@ import numpy as np -from individual import * -from problems.abstract_problem import AbstractProblem -from mutation.mutation_operator import MutationOperator +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.mutation_operator import MutationOperator class InsertionMutation(MutationOperator): """ diff --git a/pycellga/mutation/shuffle_mutation.py b/pycellga/mutation/shuffle_mutation.py index 9a4aa05..f3b52cb 100644 --- a/pycellga/mutation/shuffle_mutation.py +++ b/pycellga/mutation/shuffle_mutation.py @@ -1,8 +1,8 @@ import numpy as np import random as rd -from individual import * -from problems.abstract_problem import AbstractProblem -from mutation.mutation_operator import MutationOperator +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.mutation_operator import MutationOperator class ShuffleMutation(MutationOperator): """ diff --git a/pycellga/mutation/swap_mutation.py b/pycellga/mutation/swap_mutation.py index e99bfea..438982b 100644 --- a/pycellga/mutation/swap_mutation.py +++ b/pycellga/mutation/swap_mutation.py @@ -1,7 +1,7 @@ import numpy as np -from individual import * -from problems.abstract_problem import AbstractProblem -from mutation.mutation_operator import MutationOperator +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.mutation_operator import MutationOperator class SwapMutation(MutationOperator): """ diff --git a/pycellga/mutation/two_opt_mutation.py b/pycellga/mutation/two_opt_mutation.py index e8cc3b5..98073b4 100644 --- a/pycellga/mutation/two_opt_mutation.py +++ b/pycellga/mutation/two_opt_mutation.py @@ -1,7 +1,7 @@ import numpy as np -from individual import * -from problems.abstract_problem import AbstractProblem -from mutation.mutation_operator import MutationOperator +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.mutation_operator import MutationOperator class TwoOptMutation(MutationOperator): """ diff --git a/pycellga/optimizer.py b/pycellga/optimizer.py index 1506c7f..8df34a6 100644 --- a/pycellga/optimizer.py +++ b/pycellga/optimizer.py @@ -2,49 +2,49 @@ # ------------------------------ selection --------------------------------- # -from selection.roulette_wheel_selection import RouletteWheelSelection -from selection.tournament_selection import TournamentSelection -from selection.selection_operator import SelectionOperator +from pycellga.selection.roulette_wheel_selection import RouletteWheelSelection +from pycellga.selection.tournament_selection import TournamentSelection +from pycellga.selection.selection_operator import SelectionOperator # -------------------------------------------------------------------------- # # ------------------------------ recombination ----------------------------- # -from recombination.one_point_crossover import OnePointCrossover -from recombination.pmx_crossover import PMXCrossover -from recombination.two_point_crossover import TwoPointCrossover -from recombination.uniform_crossover import UniformCrossover -from recombination.byte_uniform_crossover import ByteUniformCrossover -from recombination.byte_one_point_crossover import ByteOnePointCrossover -from recombination.byte_one_point_crossover import ByteOnePointCrossover -from recombination.flat_crossover import FlatCrossover -from recombination.arithmetic_crossover import ArithmeticCrossover -from recombination.blxalpha_crossover import BlxalphaCrossover -from recombination.linear_crossover import LinearCrossover -from recombination.unfair_avarage_crossover import UnfairAvarageCrossover -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.one_point_crossover import OnePointCrossover +from pycellga.recombination.pmx_crossover import PMXCrossover +from pycellga.recombination.two_point_crossover import TwoPointCrossover +from pycellga.recombination.uniform_crossover import UniformCrossover +from pycellga.recombination.byte_uniform_crossover import ByteUniformCrossover +from pycellga.recombination.byte_one_point_crossover import ByteOnePointCrossover +from pycellga.recombination.byte_one_point_crossover import ByteOnePointCrossover +from pycellga.recombination.flat_crossover import FlatCrossover +from pycellga.recombination.arithmetic_crossover import ArithmeticCrossover +from pycellga.recombination.blxalpha_crossover import BlxalphaCrossover +from pycellga.recombination.linear_crossover import LinearCrossover +from pycellga.recombination.unfair_avarage_crossover import UnfairAvarageCrossover +from pycellga.recombination.recombination_operator import RecombinationOperator # -------------------------------------------------------------------------- # # -------------------------------- mutation -------------------------------- # -from mutation.bit_flip_mutation import BitFlipMutation -from mutation.byte_mutation import ByteMutation -from mutation.byte_mutation_random import ByteMutationRandom -from mutation.insertion_mutation import InsertionMutation -from mutation.shuffle_mutation import ShuffleMutation -from mutation.swap_mutation import SwapMutation -from mutation.two_opt_mutation import TwoOptMutation -from mutation.float_uniform_mutation import FloatUniformMutation -from mutation.mutation_operator import MutationOperator +from pycellga.mutation.bit_flip_mutation import BitFlipMutation +from pycellga.mutation.byte_mutation import ByteMutation +from pycellga.mutation.byte_mutation_random import ByteMutationRandom +from pycellga.mutation.insertion_mutation import InsertionMutation +from pycellga.mutation.shuffle_mutation import ShuffleMutation +from pycellga.mutation.swap_mutation import SwapMutation +from pycellga.mutation.two_opt_mutation import TwoOptMutation +from pycellga.mutation.float_uniform_mutation import FloatUniformMutation +from pycellga.mutation.mutation_operator import MutationOperator # -------------------------------------------------------------------------- # import random import numpy as np import byte_operators -from population import * -from individual import * -from mutation.bit_flip_mutation import * -from selection.tournament_selection import * -from recombination.one_point_crossover import * -from problems.single_objective.discrete.binary.one_max import * +from pycellga.population import * +from pycellga.individual import * +from pycellga.mutation.bit_flip_mutation import * +from pycellga.selection.tournament_selection import * +from pycellga.recombination.one_point_crossover import * +from pycellga.problems.single_objective.discrete.binary.one_max import * from typing import Callable, List, Tuple from collections.abc import Callable diff --git a/pycellga/population.py b/pycellga/population.py index 2b1c11d..a002cc5 100644 --- a/pycellga/population.py +++ b/pycellga/population.py @@ -1,9 +1,9 @@ from typing import List -from individual import * -from grid import * -from neighborhoods.linear_9 import Linear9 -from byte_operators import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.grid import * +from pycellga.neighborhoods.linear_9 import Linear9 +from pycellga.byte_operators import * +from pycellga.problems.abstract_problem import AbstractProblem from enum import Enum diff --git a/pycellga/problems/single_objective/continuous/ackley.py b/pycellga/problems/single_objective/continuous/ackley.py index 695f065..a835b85 100644 --- a/pycellga/problems/single_objective/continuous/ackley.py +++ b/pycellga/problems/single_objective/continuous/ackley.py @@ -1,5 +1,5 @@ from numpy import pi, e, cos, sqrt, exp -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Ackley(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/bentcigar.py b/pycellga/problems/single_objective/continuous/bentcigar.py index 5b91f6b..4b86488 100644 --- a/pycellga/problems/single_objective/continuous/bentcigar.py +++ b/pycellga/problems/single_objective/continuous/bentcigar.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw from typing import List import numpy as np diff --git a/pycellga/problems/single_objective/continuous/bohachevsky.py b/pycellga/problems/single_objective/continuous/bohachevsky.py index 6092ec5..4b07929 100644 --- a/pycellga/problems/single_objective/continuous/bohachevsky.py +++ b/pycellga/problems/single_objective/continuous/bohachevsky.py @@ -1,7 +1,7 @@ from numpy import cos, pi from mpmath import power as pw from typing import List, Dict, Any -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Bohachevsky(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/chichinadze.py b/pycellga/problems/single_objective/continuous/chichinadze.py index 02c899f..31149a7 100644 --- a/pycellga/problems/single_objective/continuous/chichinadze.py +++ b/pycellga/problems/single_objective/continuous/chichinadze.py @@ -1,6 +1,6 @@ import numpy as np from typing import List -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Chichinadze(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/dropwave.py b/pycellga/problems/single_objective/continuous/dropwave.py index 455f0b3..a191711 100644 --- a/pycellga/problems/single_objective/continuous/dropwave.py +++ b/pycellga/problems/single_objective/continuous/dropwave.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from numpy import power, cos, sqrt class Dropwave(AbstractProblem): diff --git a/pycellga/problems/single_objective/continuous/fms.py b/pycellga/problems/single_objective/continuous/fms.py index facf48f..eb77b40 100644 --- a/pycellga/problems/single_objective/continuous/fms.py +++ b/pycellga/problems/single_objective/continuous/fms.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from numpy import pi, sin import numpy as np diff --git a/pycellga/problems/single_objective/continuous/griewank.py b/pycellga/problems/single_objective/continuous/griewank.py index cb60cbc..160f946 100644 --- a/pycellga/problems/single_objective/continuous/griewank.py +++ b/pycellga/problems/single_objective/continuous/griewank.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem import math from typing import List diff --git a/pycellga/problems/single_objective/continuous/holzman.py b/pycellga/problems/single_objective/continuous/holzman.py index 010d0cb..1ddc66f 100644 --- a/pycellga/problems/single_objective/continuous/holzman.py +++ b/pycellga/problems/single_objective/continuous/holzman.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw from typing import List diff --git a/pycellga/problems/single_objective/continuous/levy.py b/pycellga/problems/single_objective/continuous/levy.py index d6cadaf..b463f7b 100644 --- a/pycellga/problems/single_objective/continuous/levy.py +++ b/pycellga/problems/single_objective/continuous/levy.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem import math from mpmath import power as pw from typing import List diff --git a/pycellga/problems/single_objective/continuous/matyas.py b/pycellga/problems/single_objective/continuous/matyas.py index deadee3..f170132 100644 --- a/pycellga/problems/single_objective/continuous/matyas.py +++ b/pycellga/problems/single_objective/continuous/matyas.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw class Matyas(AbstractProblem): diff --git a/pycellga/problems/single_objective/continuous/pow.py b/pycellga/problems/single_objective/continuous/pow.py index f490751..21802eb 100644 --- a/pycellga/problems/single_objective/continuous/pow.py +++ b/pycellga/problems/single_objective/continuous/pow.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw from typing import List, Tuple diff --git a/pycellga/problems/single_objective/continuous/powell.py b/pycellga/problems/single_objective/continuous/powell.py index f1d1292..98fcb46 100644 --- a/pycellga/problems/single_objective/continuous/powell.py +++ b/pycellga/problems/single_objective/continuous/powell.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw class Powell(AbstractProblem): diff --git a/pycellga/problems/single_objective/continuous/rastrigin.py b/pycellga/problems/single_objective/continuous/rastrigin.py index 20a07d4..77bdb98 100644 --- a/pycellga/problems/single_objective/continuous/rastrigin.py +++ b/pycellga/problems/single_objective/continuous/rastrigin.py @@ -1,5 +1,5 @@ from numpy import cos, pi -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Rastrigin(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/rosenbrock.py b/pycellga/problems/single_objective/continuous/rosenbrock.py index 0b11b1e..7599d6a 100644 --- a/pycellga/problems/single_objective/continuous/rosenbrock.py +++ b/pycellga/problems/single_objective/continuous/rosenbrock.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw class Rosenbrock(AbstractProblem): diff --git a/pycellga/problems/single_objective/continuous/rothellipsoid.py b/pycellga/problems/single_objective/continuous/rothellipsoid.py index a1a3250..cae6803 100644 --- a/pycellga/problems/single_objective/continuous/rothellipsoid.py +++ b/pycellga/problems/single_objective/continuous/rothellipsoid.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw class Rothellipsoid(AbstractProblem): diff --git a/pycellga/problems/single_objective/continuous/schaffer.py b/pycellga/problems/single_objective/continuous/schaffer.py index 9c48ac3..89f75c6 100644 --- a/pycellga/problems/single_objective/continuous/schaffer.py +++ b/pycellga/problems/single_objective/continuous/schaffer.py @@ -1,6 +1,6 @@ import numpy as np from mpmath import power as pw -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Schaffer(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/schaffer2.py b/pycellga/problems/single_objective/continuous/schaffer2.py index 84e6f9c..451c654 100644 --- a/pycellga/problems/single_objective/continuous/schaffer2.py +++ b/pycellga/problems/single_objective/continuous/schaffer2.py @@ -1,6 +1,6 @@ import numpy as np from numpy import power as pw -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Schaffer2(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/schwefel.py b/pycellga/problems/single_objective/continuous/schwefel.py index 2512a8f..0a19053 100644 --- a/pycellga/problems/single_objective/continuous/schwefel.py +++ b/pycellga/problems/single_objective/continuous/schwefel.py @@ -1,5 +1,5 @@ from numpy import sin, sqrt -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Schwefel(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/sphere.py b/pycellga/problems/single_objective/continuous/sphere.py index 0d44b94..a1ad2ef 100644 --- a/pycellga/problems/single_objective/continuous/sphere.py +++ b/pycellga/problems/single_objective/continuous/sphere.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Sphere(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/styblinskitang.py b/pycellga/problems/single_objective/continuous/styblinskitang.py index 2cfc797..7de8eee 100644 --- a/pycellga/problems/single_objective/continuous/styblinskitang.py +++ b/pycellga/problems/single_objective/continuous/styblinskitang.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw class StyblinskiTang(AbstractProblem): diff --git a/pycellga/problems/single_objective/continuous/sumofdifferentpowers.py b/pycellga/problems/single_objective/continuous/sumofdifferentpowers.py index 633764c..f58d6e2 100644 --- a/pycellga/problems/single_objective/continuous/sumofdifferentpowers.py +++ b/pycellga/problems/single_objective/continuous/sumofdifferentpowers.py @@ -1,6 +1,6 @@ import numpy as np from mpmath import power as pw -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Sumofdifferentpowers(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/threehumps.py b/pycellga/problems/single_objective/continuous/threehumps.py index ddc13bb..64b460b 100644 --- a/pycellga/problems/single_objective/continuous/threehumps.py +++ b/pycellga/problems/single_objective/continuous/threehumps.py @@ -1,5 +1,5 @@ from mpmath import power as pw -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Threehumps(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/continuous/zakharov.py b/pycellga/problems/single_objective/continuous/zakharov.py index d7dce70..2f6532a 100644 --- a/pycellga/problems/single_objective/continuous/zakharov.py +++ b/pycellga/problems/single_objective/continuous/zakharov.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw from typing import List, Any diff --git a/pycellga/problems/single_objective/continuous/zettle.py b/pycellga/problems/single_objective/continuous/zettle.py index 5796380..550122d 100644 --- a/pycellga/problems/single_objective/continuous/zettle.py +++ b/pycellga/problems/single_objective/continuous/zettle.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from mpmath import power as pw class Zettle(AbstractProblem): diff --git a/pycellga/problems/single_objective/discrete/binary/count_sat.py b/pycellga/problems/single_objective/discrete/binary/count_sat.py index 39b4c0d..40f2383 100644 --- a/pycellga/problems/single_objective/discrete/binary/count_sat.py +++ b/pycellga/problems/single_objective/discrete/binary/count_sat.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class CountSat(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/discrete/binary/ecc.py b/pycellga/problems/single_objective/discrete/binary/ecc.py index 86b2928..a4a54ee 100644 --- a/pycellga/problems/single_objective/discrete/binary/ecc.py +++ b/pycellga/problems/single_objective/discrete/binary/ecc.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Ecc(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/discrete/binary/fms.py b/pycellga/problems/single_objective/discrete/binary/fms.py index 04c0f0f..6634b2f 100644 --- a/pycellga/problems/single_objective/discrete/binary/fms.py +++ b/pycellga/problems/single_objective/discrete/binary/fms.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from numpy import pi, sin, random class Fms(AbstractProblem): diff --git a/pycellga/problems/single_objective/discrete/binary/maxcut100.py b/pycellga/problems/single_objective/discrete/binary/maxcut100.py index 849628c..6d94650 100644 --- a/pycellga/problems/single_objective/discrete/binary/maxcut100.py +++ b/pycellga/problems/single_objective/discrete/binary/maxcut100.py @@ -1,5 +1,5 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Maxcut100(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/discrete/binary/maxcut20_01.py b/pycellga/problems/single_objective/discrete/binary/maxcut20_01.py index f01846a..6c9aa38 100644 --- a/pycellga/problems/single_objective/discrete/binary/maxcut20_01.py +++ b/pycellga/problems/single_objective/discrete/binary/maxcut20_01.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Maxcut20_01(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/discrete/binary/maxcut20_09.py b/pycellga/problems/single_objective/discrete/binary/maxcut20_09.py index 2a45c20..6c42433 100644 --- a/pycellga/problems/single_objective/discrete/binary/maxcut20_09.py +++ b/pycellga/problems/single_objective/discrete/binary/maxcut20_09.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem class Maxcut20_09(AbstractProblem): """ diff --git a/pycellga/problems/single_objective/discrete/binary/mmdp.py b/pycellga/problems/single_objective/discrete/binary/mmdp.py index c2017c6..90ff2cd 100644 --- a/pycellga/problems/single_objective/discrete/binary/mmdp.py +++ b/pycellga/problems/single_objective/discrete/binary/mmdp.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from typing import List, Tuple class Mmdp(AbstractProblem): diff --git a/pycellga/problems/single_objective/discrete/binary/one_max.py b/pycellga/problems/single_objective/discrete/binary/one_max.py index 1d5919a..402a62d 100644 --- a/pycellga/problems/single_objective/discrete/binary/one_max.py +++ b/pycellga/problems/single_objective/discrete/binary/one_max.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from typing import List, Tuple class OneMax(AbstractProblem): diff --git a/pycellga/problems/single_objective/discrete/binary/peak.py b/pycellga/problems/single_objective/discrete/binary/peak.py index 41b55bf..ee9e6f3 100644 --- a/pycellga/problems/single_objective/discrete/binary/peak.py +++ b/pycellga/problems/single_objective/discrete/binary/peak.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem from numpy import random from typing import List, Tuple diff --git a/pycellga/problems/single_objective/discrete/permutation/tsp.py b/pycellga/problems/single_objective/discrete/permutation/tsp.py index d79fabf..17c0b32 100644 --- a/pycellga/problems/single_objective/discrete/permutation/tsp.py +++ b/pycellga/problems/single_objective/discrete/permutation/tsp.py @@ -1,4 +1,4 @@ -from problems.abstract_problem import AbstractProblem +from pycellga.problems.abstract_problem import AbstractProblem import tsplib95 from math import sqrt from geopy.distance import geodesic diff --git a/pycellga/recombination/arithmetic_crossover.py b/pycellga/recombination/arithmetic_crossover.py index 0792c5b..b400403 100644 --- a/pycellga/recombination/arithmetic_crossover.py +++ b/pycellga/recombination/arithmetic_crossover.py @@ -1,8 +1,8 @@ import random -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class ArithmeticCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/blxalpha_crossover.py b/pycellga/recombination/blxalpha_crossover.py index 4fae74d..13d1aef 100644 --- a/pycellga/recombination/blxalpha_crossover.py +++ b/pycellga/recombination/blxalpha_crossover.py @@ -1,8 +1,8 @@ import random -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class BlxalphaCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/byte_one_point_crossover.py b/pycellga/recombination/byte_one_point_crossover.py index 06ffcf8..e637727 100644 --- a/pycellga/recombination/byte_one_point_crossover.py +++ b/pycellga/recombination/byte_one_point_crossover.py @@ -1,9 +1,9 @@ import numpy as np -from individual import Individual +from pycellga.individual import Individual from problems.abstract_problem import AbstractProblem from typing import List import struct -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class ByteOnePointCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/byte_uniform_crossover.py b/pycellga/recombination/byte_uniform_crossover.py index ba81ead..1fea508 100644 --- a/pycellga/recombination/byte_uniform_crossover.py +++ b/pycellga/recombination/byte_uniform_crossover.py @@ -1,9 +1,9 @@ import numpy.random as randomgenerator -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List import struct -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class ByteUniformCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/flat_crossover.py b/pycellga/recombination/flat_crossover.py index 295d0f3..b44d3ee 100644 --- a/pycellga/recombination/flat_crossover.py +++ b/pycellga/recombination/flat_crossover.py @@ -1,8 +1,8 @@ import random -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class FlatCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/linear_crossover.py b/pycellga/recombination/linear_crossover.py index 27d1c0c..3d630c3 100644 --- a/pycellga/recombination/linear_crossover.py +++ b/pycellga/recombination/linear_crossover.py @@ -1,8 +1,8 @@ import random -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class LinearCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/one_point_crossover.py b/pycellga/recombination/one_point_crossover.py index d85825b..3b156f2 100644 --- a/pycellga/recombination/one_point_crossover.py +++ b/pycellga/recombination/one_point_crossover.py @@ -1,8 +1,8 @@ import numpy as np -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class OnePointCrossover(RecombinationOperator): diff --git a/pycellga/recombination/pmx_crossover.py b/pycellga/recombination/pmx_crossover.py index 90848a0..0f6b40e 100644 --- a/pycellga/recombination/pmx_crossover.py +++ b/pycellga/recombination/pmx_crossover.py @@ -1,7 +1,7 @@ -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class PMXCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/two_point_crossover.py b/pycellga/recombination/two_point_crossover.py index 1ee064e..56d832e 100644 --- a/pycellga/recombination/two_point_crossover.py +++ b/pycellga/recombination/two_point_crossover.py @@ -1,8 +1,8 @@ import numpy as np -from individual import Individual -from problems.abstract_problem import AbstractProblem +from pycellga.individual import Individual +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class TwoPointCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/unfair_avarage_crossover.py b/pycellga/recombination/unfair_avarage_crossover.py index dee8b62..e0f1534 100644 --- a/pycellga/recombination/unfair_avarage_crossover.py +++ b/pycellga/recombination/unfair_avarage_crossover.py @@ -1,8 +1,8 @@ import random -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class UnfairAvarageCrossover(RecombinationOperator): """ diff --git a/pycellga/recombination/uniform_crossover.py b/pycellga/recombination/uniform_crossover.py index 2ed30e2..9c2ac5f 100644 --- a/pycellga/recombination/uniform_crossover.py +++ b/pycellga/recombination/uniform_crossover.py @@ -1,8 +1,8 @@ import numpy.random as randomgenerator -from individual import * -from problems.abstract_problem import AbstractProblem +from pycellga.individual import * +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from recombination.recombination_operator import RecombinationOperator +from pycellga.recombination.recombination_operator import RecombinationOperator class UniformCrossover(RecombinationOperator): """ diff --git a/pycellga/selection/roulette_wheel_selection.py b/pycellga/selection/roulette_wheel_selection.py index 9bfcd45..3afd391 100644 --- a/pycellga/selection/roulette_wheel_selection.py +++ b/pycellga/selection/roulette_wheel_selection.py @@ -1,6 +1,6 @@ from typing import List -from individual import Individual -from selection.selection_operator import SelectionOperator +from pycellga.individual import Individual +from pycellga.selection.selection_operator import SelectionOperator import random class RouletteWheelSelection(SelectionOperator): diff --git a/pycellga/selection/tournament_selection.py b/pycellga/selection/tournament_selection.py index 81cfe2d..bcd9c3c 100644 --- a/pycellga/selection/tournament_selection.py +++ b/pycellga/selection/tournament_selection.py @@ -1,6 +1,6 @@ from typing import List -from individual import Individual -from selection.selection_operator import SelectionOperator +from pycellga.individual import Individual +from pycellga.selection.selection_operator import SelectionOperator import numpy as np diff --git a/pycellga/tests/test_ackley.py b/pycellga/tests/test_ackley.py index d7c3f44..025e9a1 100644 --- a/pycellga/tests/test_ackley.py +++ b/pycellga/tests/test_ackley.py @@ -1,4 +1,4 @@ -from problems.single_objective.continuous.ackley import Ackley +from pycellga.problems.single_objective.continuous.ackley import Ackley import numpy as np def test_ackley(): diff --git a/pycellga/tests/test_arithmetic_crossover.py b/pycellga/tests/test_arithmetic_crossover.py index d51d4a5..30666b7 100644 --- a/pycellga/tests/test_arithmetic_crossover.py +++ b/pycellga/tests/test_arithmetic_crossover.py @@ -1,8 +1,8 @@ import pytest import random -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from recombination.arithmetic_crossover import ArithmeticCrossover +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.arithmetic_crossover import ArithmeticCrossover class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_bentcigar_function.py b/pycellga/tests/test_bentcigar_function.py index d9b8924..64e2395 100644 --- a/pycellga/tests/test_bentcigar_function.py +++ b/pycellga/tests/test_bentcigar_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.bentcigar import Bentcigar +from pycellga.problems.single_objective.continuous.bentcigar import Bentcigar @pytest.fixture def setup_bentcigar(): diff --git a/pycellga/tests/test_bit_flip_mutation.py b/pycellga/tests/test_bit_flip_mutation.py index 2c1f4db..cd52937 100644 --- a/pycellga/tests/test_bit_flip_mutation.py +++ b/pycellga/tests/test_bit_flip_mutation.py @@ -1,8 +1,8 @@ import numpy as np import pytest -from mutation.bit_flip_mutation import BitFlipMutation -from problems.single_objective.discrete.binary.one_max import OneMax -from individual import Individual, GeneType +from pycellga.mutation.bit_flip_mutation import BitFlipMutation +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.individual import Individual, GeneType def test_bit_flip_mutation(): """ diff --git a/pycellga/tests/test_blxalpha_crossover.py b/pycellga/tests/test_blxalpha_crossover.py index d49fabb..e086e72 100644 --- a/pycellga/tests/test_blxalpha_crossover.py +++ b/pycellga/tests/test_blxalpha_crossover.py @@ -1,8 +1,8 @@ import pytest import random -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from recombination.blxalpha_crossover import BlxalphaCrossover +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.blxalpha_crossover import BlxalphaCrossover class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_bohachevsky.py b/pycellga/tests/test_bohachevsky.py index f29d32a..c6f48ff 100644 --- a/pycellga/tests/test_bohachevsky.py +++ b/pycellga/tests/test_bohachevsky.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.bohachevsky import Bohachevsky +from pycellga.problems.single_objective.continuous.bohachevsky import Bohachevsky @pytest.fixture def setup_bohachevsky(): diff --git a/pycellga/tests/test_byte_mutation.py b/pycellga/tests/test_byte_mutation.py index 7c3026a..6afa1e2 100644 --- a/pycellga/tests/test_byte_mutation.py +++ b/pycellga/tests/test_byte_mutation.py @@ -1,8 +1,8 @@ import pytest import numpy as np -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from mutation.byte_mutation import ByteMutation +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.byte_mutation import ByteMutation class MockProblem(AbstractProblem): diff --git a/pycellga/tests/test_byte_mutation_random.py b/pycellga/tests/test_byte_mutation_random.py index 0011428..5731dfc 100644 --- a/pycellga/tests/test_byte_mutation_random.py +++ b/pycellga/tests/test_byte_mutation_random.py @@ -1,8 +1,8 @@ import pytest import numpy as np -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from mutation.byte_mutation_random import ByteMutationRandom +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.byte_mutation_random import ByteMutationRandom class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_byte_one_point_crossover.py b/pycellga/tests/test_byte_one_point_crossover.py index a6dc7a2..4e80588 100644 --- a/pycellga/tests/test_byte_one_point_crossover.py +++ b/pycellga/tests/test_byte_one_point_crossover.py @@ -1,8 +1,8 @@ import pytest import numpy as np -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from recombination.byte_one_point_crossover import ByteOnePointCrossover +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.byte_one_point_crossover import ByteOnePointCrossover class MockProblem(AbstractProblem): diff --git a/pycellga/tests/test_byte_operators.py b/pycellga/tests/test_byte_operators.py index 8c15d80..afa62f4 100644 --- a/pycellga/tests/test_byte_operators.py +++ b/pycellga/tests/test_byte_operators.py @@ -1,5 +1,5 @@ import pytest -from byte_operators import float_to_bits, bits_to_float, floats_to_bits, bits_to_floats +from pycellga.byte_operators import float_to_bits, bits_to_float, floats_to_bits, bits_to_floats def test_float_to_bits(): """ diff --git a/pycellga/tests/test_byte_uniform_crossover.py b/pycellga/tests/test_byte_uniform_crossover.py index 3195764..9593bf7 100644 --- a/pycellga/tests/test_byte_uniform_crossover.py +++ b/pycellga/tests/test_byte_uniform_crossover.py @@ -1,8 +1,8 @@ import pytest import numpy.random as randomgenerator -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from recombination.byte_uniform_crossover import ByteUniformCrossover +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.byte_uniform_crossover import ByteUniformCrossover class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_chichinadze_function.py b/pycellga/tests/test_chichinadze_function.py index ff5a51b..7d41478 100644 --- a/pycellga/tests/test_chichinadze_function.py +++ b/pycellga/tests/test_chichinadze_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.chichinadze import Chichinadze +from pycellga.problems.single_objective.continuous.chichinadze import Chichinadze @pytest.fixture def setup_chichinadze(): diff --git a/pycellga/tests/test_compact_13.py b/pycellga/tests/test_compact_13.py index 901f403..01cc76c 100644 --- a/pycellga/tests/test_compact_13.py +++ b/pycellga/tests/test_compact_13.py @@ -1,4 +1,4 @@ -from neighborhoods.compact_13 import Compact13 +from pycellga.neighborhoods.compact_13 import Compact13 def test_compact_13(): """ diff --git a/pycellga/tests/test_compact_21.py b/pycellga/tests/test_compact_21.py index fcc1bb8..98ba0b5 100644 --- a/pycellga/tests/test_compact_21.py +++ b/pycellga/tests/test_compact_21.py @@ -1,4 +1,4 @@ -from neighborhoods.compact_21 import Compact21 +from pycellga.neighborhoods.compact_21 import Compact21 def test_compact_21(): """ diff --git a/pycellga/tests/test_compact_25.py b/pycellga/tests/test_compact_25.py index 49d4e83..4f26906 100644 --- a/pycellga/tests/test_compact_25.py +++ b/pycellga/tests/test_compact_25.py @@ -1,4 +1,4 @@ -from neighborhoods.compact_25 import Compact25 +from pycellga.neighborhoods.compact_25 import Compact25 def test_compact_25(): """ diff --git a/pycellga/tests/test_compact_9.py b/pycellga/tests/test_compact_9.py index c5d0002..09664d4 100644 --- a/pycellga/tests/test_compact_9.py +++ b/pycellga/tests/test_compact_9.py @@ -1,4 +1,4 @@ -from neighborhoods.compact_9 import Compact9 +from pycellga.neighborhoods.compact_9 import Compact9 def test_compact_9(): """ diff --git a/pycellga/tests/test_count_sat.py b/pycellga/tests/test_count_sat.py index 41998c8..11e8905 100644 --- a/pycellga/tests/test_count_sat.py +++ b/pycellga/tests/test_count_sat.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.count_sat import CountSat +from pycellga.problems.single_objective.discrete.binary.count_sat import CountSat @pytest.fixture def setup_count_sat(): diff --git a/pycellga/tests/test_dropwave_function.py b/pycellga/tests/test_dropwave_function.py index 2f97cba..23b56ab 100644 --- a/pycellga/tests/test_dropwave_function.py +++ b/pycellga/tests/test_dropwave_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.dropwave import Dropwave +from pycellga.problems.single_objective.continuous.dropwave import Dropwave @pytest.fixture def setup_dropwave(): diff --git a/pycellga/tests/test_ecc.py b/pycellga/tests/test_ecc.py index 79bff80..ca17c62 100644 --- a/pycellga/tests/test_ecc.py +++ b/pycellga/tests/test_ecc.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.ecc import Ecc +from pycellga.problems.single_objective.discrete.binary.ecc import Ecc @pytest.fixture def ecc_instance(): diff --git a/pycellga/tests/test_flat_crossover.py b/pycellga/tests/test_flat_crossover.py index c7e53c3..2a0a067 100644 --- a/pycellga/tests/test_flat_crossover.py +++ b/pycellga/tests/test_flat_crossover.py @@ -1,8 +1,8 @@ import pytest import random -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from recombination.flat_crossover import FlatCrossover # Replace with the actual path if different +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.flat_crossover import FlatCrossover class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_float_uniform_mutation.py b/pycellga/tests/test_float_uniform_mutation.py index 1107be9..b469a35 100644 --- a/pycellga/tests/test_float_uniform_mutation.py +++ b/pycellga/tests/test_float_uniform_mutation.py @@ -1,8 +1,8 @@ import pytest import random -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from mutation.float_uniform_mutation import FloatUniformMutation +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.mutation.float_uniform_mutation import FloatUniformMutation class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_fms.py b/pycellga/tests/test_fms.py index 756fc47..c852001 100644 --- a/pycellga/tests/test_fms.py +++ b/pycellga/tests/test_fms.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.fms import Fms +from pycellga.problems.single_objective.continuous.fms import Fms import numpy as np @pytest.fixture diff --git a/pycellga/tests/test_grid.py b/pycellga/tests/test_grid.py index a751bb8..55ea270 100644 --- a/pycellga/tests/test_grid.py +++ b/pycellga/tests/test_grid.py @@ -1,4 +1,4 @@ -from grid import Grid +from pycellga.grid import Grid def test_grid(): """ diff --git a/pycellga/tests/test_griewank_function.py b/pycellga/tests/test_griewank_function.py index a0e1c5c..c4a9797 100644 --- a/pycellga/tests/test_griewank_function.py +++ b/pycellga/tests/test_griewank_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.griewank import Griewank +from pycellga.problems.single_objective.continuous.griewank import Griewank @pytest.fixture def setup_griewank(): diff --git a/pycellga/tests/test_holzman_function.py b/pycellga/tests/test_holzman_function.py index c0b3a70..7c8caf1 100644 --- a/pycellga/tests/test_holzman_function.py +++ b/pycellga/tests/test_holzman_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.holzman import Holzman +from pycellga.problems.single_objective.continuous.holzman import Holzman @pytest.fixture def setup_holzman(): diff --git a/pycellga/tests/test_individual.py b/pycellga/tests/test_individual.py index f59ad40..994660e 100644 --- a/pycellga/tests/test_individual.py +++ b/pycellga/tests/test_individual.py @@ -1,7 +1,7 @@ import pytest from numpy import random import random as rd -from individual import Individual, GeneType +from pycellga.individual import Individual, GeneType @pytest.fixture diff --git a/pycellga/tests/test_insertion_mutation.py b/pycellga/tests/test_insertion_mutation.py index 91683e2..1290664 100644 --- a/pycellga/tests/test_insertion_mutation.py +++ b/pycellga/tests/test_insertion_mutation.py @@ -1,6 +1,6 @@ -from mutation.insertion_mutation import InsertionMutation -from problems.single_objective.discrete.permutation.tsp import Tsp -from individual import Individual, GeneType +from pycellga.mutation.insertion_mutation import InsertionMutation +from pycellga.problems.single_objective.discrete.permutation.tsp import Tsp +from pycellga.individual import Individual, GeneType import random def test_insertion_mutation(): diff --git a/pycellga/tests/test_levy_function.py b/pycellga/tests/test_levy_function.py index e2121df..d41ec00 100644 --- a/pycellga/tests/test_levy_function.py +++ b/pycellga/tests/test_levy_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.levy import Levy +from pycellga.problems.single_objective.continuous.levy import Levy @pytest.fixture def setup_levy(): diff --git a/pycellga/tests/test_linear_5.py b/pycellga/tests/test_linear_5.py index 8dfea57..0079f1a 100644 --- a/pycellga/tests/test_linear_5.py +++ b/pycellga/tests/test_linear_5.py @@ -1,4 +1,4 @@ -from neighborhoods.linear_5 import Linear5 +from pycellga.neighborhoods.linear_5 import Linear5 def test_linear_5(): """ diff --git a/pycellga/tests/test_linear_9.py b/pycellga/tests/test_linear_9.py index 8b6c7a0..4372931 100644 --- a/pycellga/tests/test_linear_9.py +++ b/pycellga/tests/test_linear_9.py @@ -1,4 +1,4 @@ -from neighborhoods.linear_9 import Linear9 +from pycellga.neighborhoods.linear_9 import Linear9 def test_linear_9(): """ diff --git a/pycellga/tests/test_linear_crossover.py b/pycellga/tests/test_linear_crossover.py index 867d0a1..e3b9636 100644 --- a/pycellga/tests/test_linear_crossover.py +++ b/pycellga/tests/test_linear_crossover.py @@ -1,8 +1,8 @@ import pytest import random -from individual import Individual -from problems.abstract_problem import AbstractProblem -from recombination.linear_crossover import LinearCrossover +from pycellga.individual import Individual +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.linear_crossover import LinearCrossover class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_matyas_function.py b/pycellga/tests/test_matyas_function.py index 8e3f75a..00c5470 100644 --- a/pycellga/tests/test_matyas_function.py +++ b/pycellga/tests/test_matyas_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.matyas import Matyas +from pycellga.problems.single_objective.continuous.matyas import Matyas @pytest.fixture def setup_matyas(): diff --git a/pycellga/tests/test_maxcut100.py b/pycellga/tests/test_maxcut100.py index 810d7c1..f4cd9e0 100644 --- a/pycellga/tests/test_maxcut100.py +++ b/pycellga/tests/test_maxcut100.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.maxcut100 import Maxcut100 +from pycellga.problems.single_objective.discrete.binary.maxcut100 import Maxcut100 @pytest.fixture def maxcut_instance(): diff --git a/pycellga/tests/test_maxcut20_01.py b/pycellga/tests/test_maxcut20_01.py index 44ca0e5..e3e7768 100644 --- a/pycellga/tests/test_maxcut20_01.py +++ b/pycellga/tests/test_maxcut20_01.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.maxcut20_01 import Maxcut20_01 +from pycellga.problems.single_objective.discrete.binary.maxcut20_01 import Maxcut20_01 @pytest.fixture def maxcut_instance(): diff --git a/pycellga/tests/test_maxcut20_09.py b/pycellga/tests/test_maxcut20_09.py index 194e53e..b8a2b03 100644 --- a/pycellga/tests/test_maxcut20_09.py +++ b/pycellga/tests/test_maxcut20_09.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.maxcut20_09 import Maxcut20_09 +from pycellga.problems.single_objective.discrete.binary.maxcut20_09 import Maxcut20_09 import numpy as np @pytest.fixture diff --git a/pycellga/tests/test_mmdp.py b/pycellga/tests/test_mmdp.py index 0371c0e..358eef2 100644 --- a/pycellga/tests/test_mmdp.py +++ b/pycellga/tests/test_mmdp.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.mmdp import Mmdp +from pycellga.problems.single_objective.discrete.binary.mmdp import Mmdp @pytest.fixture def mmdp_instance(): diff --git a/pycellga/tests/test_one_max.py b/pycellga/tests/test_one_max.py index 6da6937..5832a96 100644 --- a/pycellga/tests/test_one_max.py +++ b/pycellga/tests/test_one_max.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax @pytest.fixture def one_max_instance(): diff --git a/pycellga/tests/test_one_point_crossover.py b/pycellga/tests/test_one_point_crossover.py index 8b7e5f1..4972299 100644 --- a/pycellga/tests/test_one_point_crossover.py +++ b/pycellga/tests/test_one_point_crossover.py @@ -1,6 +1,6 @@ -from recombination.one_point_crossover import OnePointCrossover -from individual import Individual, GeneType -from problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.recombination.one_point_crossover import OnePointCrossover +from pycellga.individual import Individual, GeneType +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax def test_one_point_crossover(): """ diff --git a/pycellga/tests/test_optimizer_alpha_cga.py b/pycellga/tests/test_optimizer_alpha_cga.py index 0935fcf..b6de735 100644 --- a/pycellga/tests/test_optimizer_alpha_cga.py +++ b/pycellga/tests/test_optimizer_alpha_cga.py @@ -1,5 +1,5 @@ import pytest -from optimizer import alpha_cga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation +from pycellga.optimizer import alpha_cga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation import mpmath as mp from typing import List diff --git a/pycellga/tests/test_optimizer_ccga.py b/pycellga/tests/test_optimizer_ccga.py index 569343e..63fb3b0 100644 --- a/pycellga/tests/test_optimizer_ccga.py +++ b/pycellga/tests/test_optimizer_ccga.py @@ -1,5 +1,5 @@ import pytest -from optimizer import ccga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation +from pycellga.optimizer import ccga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation from typing import List class BinaryProblem: diff --git a/pycellga/tests/test_optimizer_cga.py b/pycellga/tests/test_optimizer_cga.py index 82cea35..42c9029 100644 --- a/pycellga/tests/test_optimizer_cga.py +++ b/pycellga/tests/test_optimizer_cga.py @@ -1,5 +1,5 @@ import pytest -from optimizer import cga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation +from pycellga.optimizer import cga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation import mpmath as mp from typing import List diff --git a/pycellga/tests/test_optimizer_mccga.py b/pycellga/tests/test_optimizer_mccga.py index db7db3b..a8c18aa 100644 --- a/pycellga/tests/test_optimizer_mccga.py +++ b/pycellga/tests/test_optimizer_mccga.py @@ -1,5 +1,5 @@ import pytest -from optimizer import mcccga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation +from pycellga.optimizer import mcccga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation import mpmath as mp from typing import List diff --git a/pycellga/tests/test_optimizer_sync_cga.py b/pycellga/tests/test_optimizer_sync_cga.py index 447b992..44d5a16 100644 --- a/pycellga/tests/test_optimizer_sync_cga.py +++ b/pycellga/tests/test_optimizer_sync_cga.py @@ -1,5 +1,5 @@ import pytest -from optimizer import sync_cga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation +from pycellga.optimizer import sync_cga, GeneType, TournamentSelection, ByteOnePointCrossover, ByteMutationRandom, OnePointCrossover, BitFlipMutation, PMXCrossover, SwapMutation import mpmath as mp from typing import List diff --git a/pycellga/tests/test_peak.py b/pycellga/tests/test_peak.py index 127b98a..4ddae5a 100644 --- a/pycellga/tests/test_peak.py +++ b/pycellga/tests/test_peak.py @@ -1,6 +1,6 @@ import pytest from numpy import random -from problems.single_objective.discrete.binary.peak import Peak +from pycellga.problems.single_objective.discrete.binary.peak import Peak @pytest.fixture def peak_instance(): diff --git a/pycellga/tests/test_pmx_crossover.py b/pycellga/tests/test_pmx_crossover.py index c35636b..3356cc4 100644 --- a/pycellga/tests/test_pmx_crossover.py +++ b/pycellga/tests/test_pmx_crossover.py @@ -1,6 +1,6 @@ -from problems.single_objective.discrete.permutation.tsp import Tsp -from recombination.pmx_crossover import PMXCrossover -from individual import Individual, GeneType +from pycellga.problems.single_objective.discrete.permutation.tsp import Tsp +from pycellga.recombination.pmx_crossover import PMXCrossover +from pycellga.individual import Individual, GeneType import random def test_pmx_crossover(): diff --git a/pycellga/tests/test_population.py b/pycellga/tests/test_population.py index 66e150f..e325965 100644 --- a/pycellga/tests/test_population.py +++ b/pycellga/tests/test_population.py @@ -1,11 +1,11 @@ import pytest -from individual import Individual, GeneType -from grid import Grid -from neighborhoods.linear_9 import Linear9 -from byte_operators import bits_to_floats -from problems.abstract_problem import AbstractProblem +from pycellga.individual import Individual, GeneType +from pycellga.grid import Grid +from pycellga.neighborhoods.linear_9 import Linear9 +from pycellga.byte_operators import bits_to_floats +from pycellga.problems.abstract_problem import AbstractProblem from typing import List -from population import Population, OptimizationMethod +from pycellga.population import Population, OptimizationMethod class MockProblem(AbstractProblem): diff --git a/pycellga/tests/test_pow_function.py b/pycellga/tests/test_pow_function.py index 27ac0d1..d87ee7f 100644 --- a/pycellga/tests/test_pow_function.py +++ b/pycellga/tests/test_pow_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.pow import Pow +from pycellga.problems.single_objective.continuous.pow import Pow @pytest.fixture def setup_pow(): diff --git a/pycellga/tests/test_powell_function.py b/pycellga/tests/test_powell_function.py index 45f8398..e53d283 100644 --- a/pycellga/tests/test_powell_function.py +++ b/pycellga/tests/test_powell_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.powell import Powell +from pycellga.problems.single_objective.continuous.powell import Powell @pytest.fixture def setup_powell(): diff --git a/pycellga/tests/test_rastrigin.py b/pycellga/tests/test_rastrigin.py index 71eea4e..add588c 100644 --- a/pycellga/tests/test_rastrigin.py +++ b/pycellga/tests/test_rastrigin.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.rastrigin import Rastrigin +from pycellga.problems.single_objective.continuous.rastrigin import Rastrigin @pytest.fixture def setup_rastrigin(): diff --git a/pycellga/tests/test_rosenbrock.py b/pycellga/tests/test_rosenbrock.py index 4729776..1fed131 100644 --- a/pycellga/tests/test_rosenbrock.py +++ b/pycellga/tests/test_rosenbrock.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.rosenbrock import Rosenbrock +from pycellga.problems.single_objective.continuous.rosenbrock import Rosenbrock @pytest.fixture def setup_rosenbrock(): diff --git a/pycellga/tests/test_rothellipsoid_function.py b/pycellga/tests/test_rothellipsoid_function.py index b57990a..a744e86 100644 --- a/pycellga/tests/test_rothellipsoid_function.py +++ b/pycellga/tests/test_rothellipsoid_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.rothellipsoid import Rothellipsoid +from pycellga.problems.single_objective.continuous.rothellipsoid import Rothellipsoid @pytest.fixture def setup_rothellipsoid(): diff --git a/pycellga/tests/test_roulette_wheel_selection.py b/pycellga/tests/test_roulette_wheel_selection.py index 75f9524..7c8c981 100644 --- a/pycellga/tests/test_roulette_wheel_selection.py +++ b/pycellga/tests/test_roulette_wheel_selection.py @@ -1,7 +1,7 @@ -from problems.single_objective.discrete.binary.one_max import OneMax -from selection.roulette_wheel_selection import RouletteWheelSelection -from population import Population, OptimizationMethod -from individual import GeneType +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.selection.roulette_wheel_selection import RouletteWheelSelection +from pycellga.population import Population, OptimizationMethod +from pycellga.individual import GeneType def test_roulette_wheel_selection(): """ diff --git a/pycellga/tests/test_schaffer2_function.py b/pycellga/tests/test_schaffer2_function.py index f98cb03..1477317 100644 --- a/pycellga/tests/test_schaffer2_function.py +++ b/pycellga/tests/test_schaffer2_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.schaffer2 import Schaffer2 +from pycellga.problems.single_objective.continuous.schaffer2 import Schaffer2 @pytest.fixture def setup_schaffer2(): diff --git a/pycellga/tests/test_schaffer_function.py b/pycellga/tests/test_schaffer_function.py index 93f1402..2e92c67 100644 --- a/pycellga/tests/test_schaffer_function.py +++ b/pycellga/tests/test_schaffer_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.schaffer import Schaffer +from pycellga.problems.single_objective.continuous.schaffer import Schaffer @pytest.fixture def setup_schaffer(): diff --git a/pycellga/tests/test_schwefel.py b/pycellga/tests/test_schwefel.py index 67399c4..155998a 100644 --- a/pycellga/tests/test_schwefel.py +++ b/pycellga/tests/test_schwefel.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.schwefel import Schwefel +from pycellga.problems.single_objective.continuous.schwefel import Schwefel @pytest.fixture def setup_schwefel(): diff --git a/pycellga/tests/test_shuffle_mutation.py b/pycellga/tests/test_shuffle_mutation.py index 14a297a..6947f75 100644 --- a/pycellga/tests/test_shuffle_mutation.py +++ b/pycellga/tests/test_shuffle_mutation.py @@ -1,6 +1,6 @@ -from mutation.shuffle_mutation import ShuffleMutation -from problems.single_objective.discrete.permutation.tsp import Tsp -from individual import Individual, GeneType +from pycellga.mutation.shuffle_mutation import ShuffleMutation +from pycellga.problems.single_objective.discrete.permutation.tsp import Tsp +from pycellga.individual import Individual, GeneType import random def test_shuffle_mutation(): diff --git a/pycellga/tests/test_sphere.py b/pycellga/tests/test_sphere.py index 21c2cda..11214d2 100644 --- a/pycellga/tests/test_sphere.py +++ b/pycellga/tests/test_sphere.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.sphere import Sphere +from pycellga.problems.single_objective.continuous.sphere import Sphere @pytest.fixture def setup_sphere(): diff --git a/pycellga/tests/test_styblinskitang_function.py b/pycellga/tests/test_styblinskitang_function.py index a904a41..a373e00 100644 --- a/pycellga/tests/test_styblinskitang_function.py +++ b/pycellga/tests/test_styblinskitang_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.styblinskitang import StyblinskiTang +from pycellga.problems.single_objective.continuous.styblinskitang import StyblinskiTang @pytest.fixture def setup_styblinski_tang(): diff --git a/pycellga/tests/test_sumofdifferentpowers_function.py b/pycellga/tests/test_sumofdifferentpowers_function.py index 9fccd61..68c0291 100644 --- a/pycellga/tests/test_sumofdifferentpowers_function.py +++ b/pycellga/tests/test_sumofdifferentpowers_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.sumofdifferentpowers import Sumofdifferentpowers +from pycellga.problems.single_objective.continuous.sumofdifferentpowers import Sumofdifferentpowers @pytest.fixture def setup_sumofdifferentpowers(): diff --git a/pycellga/tests/test_swap_mutation.py b/pycellga/tests/test_swap_mutation.py index 32402f8..982caea 100644 --- a/pycellga/tests/test_swap_mutation.py +++ b/pycellga/tests/test_swap_mutation.py @@ -1,6 +1,6 @@ -from mutation.swap_mutation import SwapMutation -from problems.single_objective.discrete.permutation.tsp import Tsp -from individual import Individual, GeneType +from pycellga.mutation.swap_mutation import SwapMutation +from pycellga.problems.single_objective.discrete.permutation.tsp import Tsp +from pycellga.individual import Individual, GeneType import random def test_swap_mutation(): diff --git a/pycellga/tests/test_threehumps_function.py b/pycellga/tests/test_threehumps_function.py index 727f73b..7911f4a 100644 --- a/pycellga/tests/test_threehumps_function.py +++ b/pycellga/tests/test_threehumps_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.threehumps import Threehumps +from pycellga.problems.single_objective.continuous.threehumps import Threehumps @pytest.fixture def setup_threehumps(): diff --git a/pycellga/tests/test_tournament_selection.py b/pycellga/tests/test_tournament_selection.py index 8be62e2..d1c6d32 100644 --- a/pycellga/tests/test_tournament_selection.py +++ b/pycellga/tests/test_tournament_selection.py @@ -1,7 +1,7 @@ -from problems.single_objective.discrete.binary.one_max import OneMax -from selection.tournament_selection import TournamentSelection -from population import Population, OptimizationMethod -from individual import GeneType +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.selection.tournament_selection import TournamentSelection +from pycellga.population import Population, OptimizationMethod +from pycellga.individual import GeneType def test_tournament_selection(): """ diff --git a/pycellga/tests/test_tsp.py b/pycellga/tests/test_tsp.py index ea5c407..64f611b 100644 --- a/pycellga/tests/test_tsp.py +++ b/pycellga/tests/test_tsp.py @@ -1,4 +1,4 @@ -from problems.single_objective.discrete.permutation.tsp import Tsp +from pycellga.problems.single_objective.discrete.permutation.tsp import Tsp import random import pytest diff --git a/pycellga/tests/test_two_opt_mutation.py b/pycellga/tests/test_two_opt_mutation.py index 59fa0a5..f4378ff 100644 --- a/pycellga/tests/test_two_opt_mutation.py +++ b/pycellga/tests/test_two_opt_mutation.py @@ -1,6 +1,6 @@ -from mutation.two_opt_mutation import TwoOptMutation -from problems.single_objective.discrete.permutation.tsp import Tsp -from individual import Individual, GeneType +from pycellga.mutation.two_opt_mutation import TwoOptMutation +from pycellga.problems.single_objective.discrete.permutation.tsp import Tsp +from pycellga.individual import Individual, GeneType import random def test_two_opt_mutation(): diff --git a/pycellga/tests/test_two_point_crossover.py b/pycellga/tests/test_two_point_crossover.py index 09e343c..581fb15 100644 --- a/pycellga/tests/test_two_point_crossover.py +++ b/pycellga/tests/test_two_point_crossover.py @@ -1,7 +1,7 @@ import numpy as np -from problems.single_objective.discrete.binary.one_max import OneMax -from recombination.two_point_crossover import TwoPointCrossover -from individual import Individual, GeneType +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.recombination.two_point_crossover import TwoPointCrossover +from pycellga.individual import Individual, GeneType def test_two_point_crossover(): """ diff --git a/pycellga/tests/test_unfair_average_crossover.py b/pycellga/tests/test_unfair_average_crossover.py index 9ddfd7d..c4068c3 100644 --- a/pycellga/tests/test_unfair_average_crossover.py +++ b/pycellga/tests/test_unfair_average_crossover.py @@ -1,8 +1,8 @@ import pytest import random -from individual import Individual, GeneType -from problems.abstract_problem import AbstractProblem -from recombination.unfair_avarage_crossover import UnfairAvarageCrossover +from pycellga.individual import Individual, GeneType +from pycellga.problems.abstract_problem import AbstractProblem +from pycellga.recombination.unfair_avarage_crossover import UnfairAvarageCrossover class MockProblem(AbstractProblem): """ diff --git a/pycellga/tests/test_uniform_crossover.py b/pycellga/tests/test_uniform_crossover.py index 52b03fa..c59d430 100644 --- a/pycellga/tests/test_uniform_crossover.py +++ b/pycellga/tests/test_uniform_crossover.py @@ -1,6 +1,6 @@ -from problems.single_objective.discrete.binary.one_max import OneMax -from recombination.uniform_crossover import UniformCrossover -from individual import Individual, GeneType +from pycellga.problems.single_objective.discrete.binary.one_max import OneMax +from pycellga.recombination.uniform_crossover import UniformCrossover +from pycellga.individual import Individual, GeneType def test_uniform_crossover(): """ diff --git a/pycellga/tests/test_zakharov_function.py b/pycellga/tests/test_zakharov_function.py index f880351..4463697 100644 --- a/pycellga/tests/test_zakharov_function.py +++ b/pycellga/tests/test_zakharov_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.zakharov import Zakharov +from pycellga.problems.single_objective.continuous.zakharov import Zakharov @pytest.fixture def setup_zakharov(): diff --git a/pycellga/tests/test_zettle_function.py b/pycellga/tests/test_zettle_function.py index fa65cc5..59cacc4 100644 --- a/pycellga/tests/test_zettle_function.py +++ b/pycellga/tests/test_zettle_function.py @@ -1,5 +1,5 @@ import pytest -from problems.single_objective.continuous.zettle import Zettle +from pycellga.problems.single_objective.continuous.zettle import Zettle @pytest.fixture def setup_zettle():