Examples of BitChromosome


Examples of org.jenetics.BitChromosome

    this.size = size;
  }

  @Override
  public Double apply(final Genotype<BitGene> genotype) {
    final BitChromosome ch =
        (BitChromosome)genotype.getChromosome();
    double size = 0;
    double value = 0;
    for (int i = 0, n = ch.length(); i < n; ++i) {
      if (ch.get(i)) {
        size += items[i].size;
        value += items[i].value;
      }
    }
View Full Code Here

Examples of org.jenetics.BitChromosome

final class OneCounter
  implements Function<Genotype<BitGene>, Integer>
{
  @Override
  public Integer apply(final Genotype<BitGene> genotype) {
    final BitChromosome chromosome =
      (BitChromosome)genotype.getChromosome();
    return chromosome.bitCount();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.