private static < A > ProgramChromosome < A > create ( final Tree < ? extends Op < A > , ? > program , final Predicate < ? super ProgramChromosome < A > > validator , final ISeq < ? extends Op < A > > operations , final ISeq < ? extends Op < A > > terminals ) { final ISeq < ProgramGene < A > > genes = FlatTreeNode . of ( program ) . stream ( ) . map ( n -> new ProgramGene <> ( n . getValue ( ) , n . childOffset ( ) , operations , terminals ) ) . collect ( ISeq . toISeq ( ) ) ; return new ProgramChromosome <> ( genes , validator , operations , terminals ) ; }
Create the chromosomes without checks .