|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.jscience.computing.ai.evolutionary.geneticalgorithms.InvalidFitnessValueException
public class InvalidFitnessValueException
Exception thrown when an invalid fitness value is tried to be used
Default implementation throws this exception when the fitness value has a negative value in these cases. You should correct your fitness function for returning positive values. Custom implementations of genetic algorithms may use other (problem spceific) criterias to throw this exception. If fitness function returns negative values, then selectChromosome() method may return a negative index for individual. To prevent ArrayIndexOutOfBounds runtime exception, this exception is implemented. Other solutions are welcome, if you have.
| Constructor Summary | |
|---|---|
InvalidFitnessValueException(java.lang.String message)
Constructs a new InvalidFitnessValueException instance with the given error message. |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InvalidFitnessValueException(java.lang.String message)
message - an error message describing the reason of this exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||