InitError
public enum InitError : Error
Errors throwed by GeneticConfiguration.init(depth:generationCount:populationSize:tournamentSize:mutationProbability:threshold:errorProbability:)
-
Throwed when
GeneticConfiguration.depth
starts with a negative numberDeclaration
Swift
case depthHasToBeAPositiveNumber
-
Throwed when
GeneticConfiguration.depth
is an emptyRange
Declaration
Swift
case depthIsEmpty
-
Throwed when
GeneticConfiguration.populationSize
starts on 0 which is not valid because that would be the size of the initial population and an empty initial population can not produce new circuitsDeclaration
Swift
case populationSizeHasToBeBiggerThanZero
-
Throwed when
GeneticConfiguration.populationSize
is an emptyRange
Declaration
Swift
case populationSizeIsEmpty
-
Throwed when
GeneticConfiguration.tournamentSize
is 0 which is not valid because a reproduction operation requires at least 1 circuit in the tournamentDeclaration
Swift
case tournamentSizeHasToBeBiggerThanZero