OccSwap#
- class libcasm.monte.events.OccSwap(
- self: OccSwap,
- first: OccCandidate,
- second: OccCandidate,
Bases:
pybind11_objectRepresents a Monte Carlo event that swaps occupants
Constructor
- Parameters:
first (
OccCandidate) – The first candidate occupantsecond (
OccCandidate) – The second candidate occupant
Methods
from_dict(…)Construct an OccSwap from a Python dict
is_valid(…)Checks if first and second are valid.
reverse(…)Transforms self so that first and second are reversed.
sort(…)Mutates self so that (first, second) <= (second, first).
sorted(…)OccSwap: Returns the sorted swap.
to_dict(…)Represent the OccSwap as a Python dict
Attributes