Crossover Record

class CrossoverRecord(molecule_record, crosser_name)[source]

Bases: object

Abstract base class for a record of a crossover operation.

Notes

You might notice that the public methods of this abstract base class are implemented. This is just a default implementation, which can be used directly by users and subclasses, but can also be freely replaced during subclass implementation, if need be.

Methods

get_crosser_name()

Get the name of the crosser which carried out the crossover.

get_molecule_record()

Get the MoleculeRecord produced by the crossover.

__init__(molecule_record, crosser_name)[source]

Initialize a CrossoverRecord instance.

Parameters
  • molecule_record (MoleculeRecord) – The molecule produced by the crossover operation.

  • crosser_name (str) – The name of the crosser which carried out the crossover.

get_crosser_name()[source]

Get the name of the crosser which carried out the crossover.

Returns

The name of the crosser.

Return type

str

get_molecule_record()[source]

Get the MoleculeRecord produced by the crossover.

Returns

The molecule record.

Return type

MoleculeRecord