code: public static <T> PermutationChromosome<T> of(
  		final ISeq<? extends T> alleles,
  		final int length
  	) {
  		require.positive(length);
  		if (length > alleles.size()) {
  			throw new IllegalArgumentException(format(
  				"The sub-set size must be be greater then the base-set: %d > %d",
  				length, alleles.size()
  			));
  		}
  
  		final int[] subset = array.shuffle(comb.subset(alleles.size(), length));
  		final ISeq<EnumGene<T>> genes = IntStream.of(subset)
  			.mapToObj(i -> EnumGene.<T>of(i, alleles))
  			.collect(ISeq.toISeq());
  
  		return new PermutationChromosome<>(genes, true);
  	}
docs: Create a new, random chromosome with the given valid alleles and the
  desired length.
  <p>
  The following example shows how to create a {@code PermutationChromosome}
  for encoding a sub-set problem (of a fixed {@code length}).
  <pre>{@code
  final ISeq<String> basicSet = ISeq.of("a", "b", "c", "d", "e", "f");
  
  // The chromosome has a length of 3 and will only contain values from the
  // given basic-set, with no duplicates.
  final PermutationChromosome<String> ch = PermutationChromosome.of(basicSet, 3);
  }</pre>
  
  @since 3.4
  
  @param <T> the allele type
  @param alleles the base-set of the valid alleles
  @param length the length of the created chromosomes
  @return a new chromosome with the given valid alleles and the desired
  length
  @throws IllegalArgumentException if {@code alleles.size() < length},
  {@code length <= 0} or {@code alleles.size()*length} will
  cause an integer overflow.
  @throws NullPointerException if one of the arguments is {@code null}