geneticengine.solutions.tree ============================ .. py:module:: geneticengine.solutions.tree Attributes ---------- .. autoapisummary:: geneticengine.solutions.tree.T Classes ------- .. autoapisummary:: geneticengine.solutions.tree.LocalSynthesisContext geneticengine.solutions.tree.TreeNode geneticengine.solutions.tree.PrettyPrintable geneticengine.solutions.tree.GengyList Module Contents --------------- .. py:class:: LocalSynthesisContext .. py:attribute:: depth :type: int .. py:attribute:: nodes :type: int .. py:attribute:: expansions :type: int .. py:attribute:: dependent_values :type: dict[str, Any] .. py:attribute:: parent_values :type: list[dict[str, Any]] .. py:class:: TreeNode Bases: :py:obj:`Protocol` Base class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing). For example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto[T](Protocol): def meth(self) -> T: ... .. py:attribute:: gengy_labeled :type: bool .. py:attribute:: gengy_distance_to_term :type: int .. py:attribute:: gengy_nodes :type: int .. py:attribute:: gengy_weighted_nodes :type: int .. py:attribute:: gengy_types_this_way :type: dict[type, list[Any]] .. py:attribute:: gengy_init_values :type: tuple[Any] .. py:attribute:: gengy_synthesis_context :type: LocalSynthesisContext .. py:class:: PrettyPrintable .. py:method:: __repr__() .. py:data:: T .. py:class:: GengyList(typ, vals) Bases: :py:obj:`list`, :py:obj:`Generic`\ [\ :py:obj:`T`\ ] Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. Initialize self. See help(type(self)) for accurate signature. .. py:attribute:: typ .. py:attribute:: gengy_init_values .. py:method:: new_like(*newargs) .. py:method:: __hash__() .. py:method:: __add__(value) Return self+value.