geneticengine.solutions.individual ================================== .. py:module:: geneticengine.solutions.individual Attributes ---------- .. autoapisummary:: geneticengine.solutions.individual.G geneticengine.solutions.individual.P Exceptions ---------- .. autoapisummary:: geneticengine.solutions.individual.IndividualNotEvaluatedException Classes ------- .. autoapisummary:: geneticengine.solutions.individual.Individual geneticengine.solutions.individual.ConcreteIndividual geneticengine.solutions.individual.PhenotypicIndividual Module Contents --------------- .. py:data:: G .. py:data:: P .. py:exception:: IndividualNotEvaluatedException Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. Initialize self. See help(type(self)) for accurate signature. .. py:class:: Individual(metadata = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`P`\ ], :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: fitness_store :type: weakref.WeakKeyDictionary[geneticengine.problems.Problem, geneticengine.problems.Fitness] .. py:attribute:: metadata :type: dict[str, Any] .. py:method:: get_phenotype() :abstractmethod: .. py:method:: has_fitness(problem) .. py:method:: set_fitness(problem, fitness) .. py:method:: get_fitness(problem = None) .. py:class:: ConcreteIndividual(instance, metadata = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`P`\ ], :py:obj:`Individual`\ [\ :py:obj:`P`\ ] Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: instance :type: P .. py:method:: get_phenotype() .. py:class:: PhenotypicIndividual(genotype, representation, metadata = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`G`\ , :py:obj:`P`\ ], :py:obj:`Individual`\ [\ :py:obj:`P`\ ] Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: genotype :type: G .. py:attribute:: representation :type: geneticengine.representations.api.Representation[G, P] .. py:attribute:: phenotype :type: P | None :value: None .. py:method:: get_phenotype() .. py:method:: __str__()