Package org.jenetics

Examples of org.jenetics.DoubleChromosome$Model


    }
  }

  public static void main(final String[] args) {
    final Factory<Genotype<DoubleGene>> gtf = Genotype.of(
      new DoubleChromosome(0.0, 10.0), // x1 in [0, 10]
      new DoubleChromosome(5.0, 33.0// x2 in [5, 33]
    );

    final Function<Genotype<DoubleGene>, Double> ff = new FF();
    final GeneticAlgorithm<DoubleGene, Double> ga = new GeneticAlgorithm<>(gtf, ff);
View Full Code Here


    }
  }

  public static void main(final String[] args) throws Exception {
    final Genotype<DoubleGene> genotype = Genotype.of(
      new DoubleChromosome(0.0, 1.0, 8),
      new DoubleChromosome(1.0, 2.0, 10),
      new DoubleChromosome(0.0, 10.0, 9),
      new DoubleChromosome(0.1, 0.9, 5)
    );

    final GeneticAlgorithm<DoubleGene, Double> ga = new GeneticAlgorithm<>(genotype, new Id(), new Scaler());
    ga.setPopulationSize(5);
    ga.setup();
View Full Code Here

TOP

Related Classes of org.jenetics.DoubleChromosome$Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.