@Test(dataProvider = "scalarCodecCount") public void minimalScalarCodec(final Integer scalars) { final ISeq<Codec<Double,DoubleGene>> seq = Stream .generate(() -> Codecs.ofScalar(DoubleRange.of(0, 1))) .limit(scalars) .collect(ISeq.toISeq()); final Codec<Double, DoubleGene> codec = new CompositeCodec<>( seq, values -> 10.0 ); final Genotype<DoubleGene> gt = codec.encoding().newInstance(); Assert.assertEquals(gt.length(), scalars.intValue()); }
@Override public Factory<Genotype<G>> encoding() { return _encoding; }
CompositeCodec implements Codec<T, G> { @Override public Factory<Genotype<G>> encoding() { return _encoding; } }
CompositeCodec implements Codec<T, G> { @Override public Factory<Genotype<G>> encoding() { return _encoding; } CompositeCodec(
		final ISeq<? extends Codec<?, G>> codecs,
		final Function<? super Object[], ? extends T> decoder
	); }
CompositeCodec implements Codec<T, G> { @Override public Factory<Genotype<G>> encoding() { return _encoding; } CompositeCodec(
		final ISeq<? extends Codec<?, G>> codecs,
		final Function<? super Object[], ? extends T> decoder
	); @Override Factory<Genotype<G>> encoding(); @Override Function<Genotype<G>, T> decoder(); @Override String toString(); }
CompositeCodec implements Codec<T, G> { @Override public Factory<Genotype<G>> encoding() { return _encoding; } CompositeCodec(
		final ISeq<? extends Codec<?, G>> codecs,
		final Function<? super Object[], ? extends T> decoder
	); @Override Factory<Genotype<G>> encoding(); @Override Function<Genotype<G>, T> decoder(); @Override String toString();  }