Skip to content

PhaseSet

PhaseSet

A lightweight class for representing the set of phases possible in a simulation with discrete state occupancies.

Source code in pylattica/discrete/phase_set.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class PhaseSet:
    """A lightweight class for representing the set of phases possible in
    a simulation with discrete state occupancies.
    """

    def __init__(self, phases: List[str]):
        """Instantiates the PhaseSet.

        Parameters
        ----------
        phases : List[str]
            The phases that exist in this simulation.
        """
        self.phases = list(set(phases))

__init__(phases)

Instantiates the PhaseSet.

Parameters
List[str]

The phases that exist in this simulation.

Source code in pylattica/discrete/phase_set.py
 9
10
11
12
13
14
15
16
17
def __init__(self, phases: List[str]):
    """Instantiates the PhaseSet.

    Parameters
    ----------
    phases : List[str]
        The phases that exist in this simulation.
    """
    self.phases = list(set(phases))