Genex v1.0.1-beta Genex.Tools.Genotype View Source

Contains functions for generating various Genotypes.

These are most of the genotypes you will use in basic genetic algorithms.

Link to this section Summary

Functions

Creates a binary geneset.

Creates a bitstring geneset.

Creates a geneset from given distribution.

Creates a permutation genotype.

Link to this section Functions

Creates a binary geneset.

Returns Enum.t().

Parameters

  • size: Size of the geneset.
Link to this function

bitstring(size, alphabet \\ :downcase)

View Source

Creates a bitstring geneset.

Returns Enum.t().

Parameters

  • size: Size of the geneset.
  • alphabet: Alphabet to use.
Link to this function

distribution(size, name \\ :normal, args \\ [])

View Source

Creates a geneset from given distribution.

Returns Enum.t().

Parameters

  • size: Size of the geneset.
  • name: Distribution name.
  • args: Optional arguments to provide to distribution.

Creates a permutation genotype.

Returns Enum.t().

Parameters

  • values: Possible values in the permutation.