choose_canonical_swap#

libcasm.monte.events.choose_canonical_swap(
occ_location: OccLocation,
canonical_swaps: list[OccSwap],
random_number_generator: RandomNumberGenerator,
) OccSwap#

Choose a swap type from a list of allowed canonical swap types

Parameters:
  • occ_location (OccLocation) – Current occupant location list

  • canonical_swaps (List[OccSwap]) – A list of allowed OccSwap for canonical Monte Carlo events. This should not include both forward and reverse swaps.

  • random_number_generator (RandomNumberGenerator) – Random number generator.

Returns:

swap – Chosen swap type.

Return type:

OccSwap