saealib.space.PermutationSpace#

class saealib.space.PermutationSpace(length)[ソース]#

ベースクラス: object

A search space whose genomes are permutations of range(length).

パラメータ:

length (int)

Methods

__init__

sample

Draw n uniformly shuffled permutations.

validate

Validate the batch type and each permutation row.

Method Details

PermutationSpace.__init__(length)[ソース]#
パラメータ:

length (int)

戻り値の型:

None

PermutationSpace.sample(n, rng=None)[ソース]#

Draw n uniformly shuffled permutations.

パラメータ:
  • n (int)

  • rng (Generator | None)

戻り値の型:

PermutationBatch

PermutationSpace.validate(genomes)[ソース]#

Validate the batch type and each permutation row.

パラメータ:

genomes (GenomeBatch)

戻り値の型:

ValidationResult