OccSwap#

class libcasm.monte.events.OccSwap(
self: OccSwap,
first: OccCandidate,
second: OccCandidate,
)#

Bases: pybind11_object

Represents a Monte Carlo event that swaps occupants

Constructor

Parameters:

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

first

The first candidate occupant

second

The second candidate occupant