Petri.Chromosome protocol (petri v0.1.0)

Copy Markdown View Source

Summary

Types

t()

All the types that implement this protocol.

Functions

Returns the chromosome's gene list.

Returns the number of genes in the chromosome.

Returns true if the chromosome satisfies its representation's invariants (e.g. a permutation has no duplicate genes).

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

genes(chromosome)

Returns the chromosome's gene list.

length(chromosome)

Returns the number of genes in the chromosome.

valid?(chromosome)

Returns true if the chromosome satisfies its representation's invariants (e.g. a permutation has no duplicate genes).