// Path: MetaHeuristics4Java/src/main/java/de/mh4j/solver/Solution.java
// public interface Solution<SolutionImplementationType extends Solution<?>> {
// 
//     /**
//      * Returns a numeric value that represents the costs of this solution. If
//      * the optimization problem is, to maximize the costs of a solution the
//      * return value indicates the absolute quality of the solution (the
//      * fitness).
//      **/
//     int getCosts();
// 
//     /**
//      * Compares this solution to another solution.
//      * 
//      * @return <code>true</code> if this solution instance is better than the
//      *         other solution<br>
//      *         <code>false</code> if this solution is of worse or equal quality.
//      **/
//     boolean isBetterThan(SolutionImplementationType otherSolution);
// 
// }
// 
// Path: MetaHeuristics4Java/src/main/java/de/mh4j/util/Comparable.java
// public interface Comparable<T> extends java.lang.Comparable<T> {
// 
//     static final int LOWER = -1;
//     static final int EQUAL = 0;
//     static final int GREATER = 1;
// 
// }
// 
// Path: MetaHeuristics4Java/src/main/java/de/mh4j/util/RNGGenerator.java
// public abstract class RNGGenerator {
//     private final static Logger log = (Logger) LoggerFactory.getLogger(RNGGenerator.class);
// 
//     private static Random seedGenerator;
// 
//     public static void setMasterSeed(long masterSeed) {
//         seedGenerator = new Random(masterSeed);
//         log.info("Initialized random number generator with master seed {}", masterSeed);
//     }
// 
//     public static Random createRandomNumberGenerator() {
//         if (seedGenerator == null) {
//             setMasterSeed(System.currentTimeMillis());
//         }
//         long seed = seedGenerator.nextLong();
//         return new Random(seed);
//     }
// 
// }


import de.mh4j.solver.Solution;
import de.mh4j.util.Comparable;
import de.mh4j.util.RNGGenerator;
import java.util.Random;
/*
 * Copyright 2012   Friedrich Große, Paul Seiferth,
 *                  Sebastian Starroske, Yannik Stein
 *
 * This file is part of MetaHeuristics4Java.
 *
 * MetaHeuristics4Java is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MetaHeuristics4Java is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MetaHeuristics4Java. If not, see <http://www.gnu.org/licenses/>.
 */

package de.mh4j.solver.genetic;



/**
 * 
 * TODO write class description
 * 
 */
public abstract class Genome implements Solution<Genome>, Comparable<Genome> {

    private final Random random;

    public final static int NO_BIRTH_GENERATION_ASSOCIATED = -1;

    private int birthGeneration;

    /**
     * TODO write javadoc<br>
     */
    public Genome() {
// Path: MetaHeuristics4Java/src/main/java/de/mh4j/solver/Solution.java
// public interface Solution<SolutionImplementationType extends Solution<?>> {
// 
//     /**
//      * Returns a numeric value that represents the costs of this solution. If
//      * the optimization problem is, to maximize the costs of a solution the
//      * return value indicates the absolute quality of the solution (the
//      * fitness).
//      **/
//     int getCosts();
// 
//     /**
//      * Compares this solution to another solution.
//      * 
//      * @return <code>true</code> if this solution instance is better than the
//      *         other solution<br>
//      *         <code>false</code> if this solution is of worse or equal quality.
//      **/
//     boolean isBetterThan(SolutionImplementationType otherSolution);
// 
// }
// 
// Path: MetaHeuristics4Java/src/main/java/de/mh4j/util/Comparable.java
// public interface Comparable<T> extends java.lang.Comparable<T> {
// 
//     static final int LOWER = -1;
//     static final int EQUAL = 0;
//     static final int GREATER = 1;
// 
// }
// 
// Path: MetaHeuristics4Java/src/main/java/de/mh4j/util/RNGGenerator.java
// public abstract class RNGGenerator {
//     private final static Logger log = (Logger) LoggerFactory.getLogger(RNGGenerator.class);
// 
//     private static Random seedGenerator;
// 
//     public static void setMasterSeed(long masterSeed) {
//         seedGenerator = new Random(masterSeed);
//         log.info("Initialized random number generator with master seed {}", masterSeed);
//     }
// 
//     public static Random createRandomNumberGenerator() {
//         if (seedGenerator == null) {
//             setMasterSeed(System.currentTimeMillis());
//         }
//         long seed = seedGenerator.nextLong();
//         return new Random(seed);
//     }
// 
// }


// Path: MetaHeuristics4Java/src/main/java/de/mh4j/solver/genetic/Genome.java
import de.mh4j.solver.Solution;
import de.mh4j.util.Comparable;
import de.mh4j.util.RNGGenerator;
import java.util.Random;

/*
 * Copyright 2012   Friedrich Große, Paul Seiferth,
 *                  Sebastian Starroske, Yannik Stein
 *
 * This file is part of MetaHeuristics4Java.
 *
 * MetaHeuristics4Java is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MetaHeuristics4Java is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MetaHeuristics4Java. If not, see <http://www.gnu.org/licenses/>.
 */

package de.mh4j.solver.genetic;



/**
 * 
 * TODO write class description
 * 
 */
public abstract class Genome implements Solution<Genome>, Comparable<Genome> {

    private final Random random;

    public final static int NO_BIRTH_GENERATION_ASSOCIATED = -1;

    private int birthGeneration;

    /**
     * TODO write javadoc<br>
     */
    public Genome() {
        random = RNGGenerator.createRandomNumberGenerator();