Class StableWeightedGeneList

java.lang.Object
com.hexagram2021.chromosomelib.registry.SimpleWeightedGeneList
com.hexagram2021.chromosomelib.registry.StableWeightedGeneList
All Implemented Interfaces:
IWeightedGeneList

public class StableWeightedGeneList extends SimpleWeightedGeneList
This list simulates the fact that homozygotes are more common in nature for some species.
  • Field Details

    • possibilityOfStable

      protected final double possibilityOfStable
      The possibility that we don't generate a random gene but directly return the generated one.

      Notice that this is NOT the possibility of homozygotes - it should be possibilityOfStable + (1 - possibilityOfStable) * p, where p is the original possibility of choosing two same gene.

  • Constructor Details

    • StableWeightedGeneList

      protected StableWeightedGeneList(double possibilityOfStable, com.google.common.collect.ImmutableList<IWeightedGeneList.Entry> entries)
  • Method Details