@ Override public ProgramGene < A > newInstance ( final Op < A > op ) { if ( getValue ( ) . arity ( ) != op . arity ( ) ) { throw new IllegalArgumentException ( format ( "New operation must have same arity: %s[%d] != %s[%d]" , getValue ( ) . name ( ) , getValue ( ) . arity ( ) , op . name ( ) , op . arity ( ) ) ) ; } return new ProgramGene <> ( op , childOffset ( ) , _operations , _terminals ) ; }
Create a new program gene with the given operation .