Package io.jenetics.ext
Interface TreeChromosome<A,G extends TreeGene<A,G>>
-
- All Superinterfaces:
BaseSeq<G>
,Chromosome<G>
,Factory<Chromosome<G>>
,Iterable<G>
,RandomAccess
,Verifiable
- All Known Implementing Classes:
AbstractTreeChromosome
public interface TreeChromosome<A,G extends TreeGene<A,G>> extends Chromosome<G>
Chromosome for tree shaped genes.- Since:
- 3.9
- Version:
- 6.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default G
root()
Return the root gene of this chromosome.-
Methods inherited from interface io.jenetics.util.BaseSeq
forEach, get, isEmpty, iterator, length, listIterator, nonEmpty, spliterator, stream
-
Methods inherited from interface io.jenetics.Chromosome
as, gene, isValid, newInstance
-
Methods inherited from interface io.jenetics.util.Factory
instances, newInstance
-
-
-
-
Method Detail
-
root
default G root()
Return the root gene of this chromosome. Since the gene type is also aTree
, you are able to assign it to one.This method is also an alias forfinal Tree<A, ?> t1 = root(); final Tree<?, ?> t2 = root();
Chromosome.gene()
, which returns the first gene of the chromosome.- Returns:
- the root tree gene of this chromosome
- See Also:
Chromosome.gene()
-
-