Interface TreeGene<A,​G extends TreeGene<A,​G>>

    • Method Detail

      • value

        default A value()
        Description copied from interface: Tree
        Return the value of the current Tree node. The value may be null.
        Specified by:
        value in interface Tree<A,​G extends TreeGene<A,​G>>
        Returns:
        the value of the current Tree node
      • newInstance

        G newInstance​(A allele,
                      int childOffset,
                      int childCount)
        Return a new tree gene with the given allele and the local tree structure.
        Parameters:
        allele - the actual gene allele
        childOffset - the offset of the first node child within the chromosome
        childCount - the number of children of the new tree gene
        Returns:
        a new tree gene with the given parameters
        Throws:
        IllegalArgumentException - if the childCount is smaller than zero
      • newInstance

        default G newInstance​(FlatTree<? extends A,​?> tree)
        Return a new tree gene from the given flat tree node.
        Parameters:
        tree - the flat tree node
        Returns:
        a new tree gene from the given flat tree node
        Throws:
        NullPointerException - if the given tree node is null
        Since:
        6.0