Package io.jenetics.ext
Interface TreeGene<A,G extends TreeGene<A,G>>
- 
- All Known Implementing Classes:
- AbstractTreeGene
 
 public interface TreeGene<A,G extends TreeGene<A,G>> extends Gene<A,G>, FlatTree<A,G> Representation of tree shaped gene. Since the genes are part of a chromosome, they are implementing theFlatTreeinterface, which makes the required storage layout explicit.- Since:
- 3.9
- Version:
- 6.0
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description GnewInstance(A allele, int childOffset, int childCount)Return a new tree gene with the given allele and the local tree structure.default GnewInstance(FlatTree<? extends A,?> tree)Return a new tree gene from the given flat tree node.default Avalue()Return the value of the currentTreenode.- 
Methods inherited from interface io.jenetics.ext.util.FlatTreechildOffset, flattenedNodes
 - 
Methods inherited from interface io.jenetics.Geneallele, newInstance, newInstance
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 - 
Methods inherited from interface io.jenetics.ext.util.TreebreadthFirstIterator, breadthFirstStream, childAfter, childAt, childAtPath, childAtPath, childBefore, childCount, childIterator, childPath, childStream, depth, depthFirstIterator, depthFirstStream, firstChild, firstLeaf, identical, indexOf, isAncestor, isChild, isDescendant, isLeaf, isRelated, isRoot, isSibling, iterator, lastChild, lastLeaf, leafCount, level, nextLeaf, nextNode, nextSibling, parent, path, pathElements, pathFromAncestorIterator, postorderIterator, postorderStream, preorderIterator, preorderStream, previousLeaf, previousNode, previousSibling, root, sharedAncestor, siblingCount, size, stream, toParenthesesString, toParenthesesString
 - 
Methods inherited from interface io.jenetics.util.VerifiableisValid
 
- 
 
- 
- 
- 
Method Detail- 
valuedefault A value() Description copied from interface:TreeReturn the value of the currentTreenode. The value may benull.
 - 
newInstanceG 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- childCountis smaller than zero
 
 - 
newInstancedefault 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- treenode is- null
- Since:
- 6.0
 
 
- 
 
-