amachine.am_causal_state API documentation

GitLab Repo

# amachine.am_causal_state

View Source

     1from dataclasses import dataclass, field
     2
     3@dataclass
     4class CausalState :
     5	name      : str
     6	classes   : set[str] = field(default_factory=set)
     7	isomorphs : set[str] = field(default_factory=set)
     8
     9	def add_class( self, class_name ) :
    10		self.classes.add( class_name )
    11
    12	def add_isomorph( self, state_name ) :
    13		self.isomorphs.add( state_name )

@dataclass
class CausalState: View Source

     4@dataclass
     5class CausalState :
     6	name      : str
     7	classes   : set[str] = field(default_factory=set)
     8	isomorphs : set[str] = field(default_factory=set)
     9
    10	def add_class( self, class_name ) :
    11		self.classes.add( class_name )
    12
    13	def add_isomorph( self, state_name ) :
    14		self.isomorphs.add( state_name )

CausalState( name: str, classes: set[str] = <factory>, isomorphs: set[str] = <factory>)
name: str
classes: set[str]
isomorphs: set[str]
def add_class(self, class_name): View Source

    10	def add_class( self, class_name ) :
    11		self.classes.add( class_name )

def add_isomorph(self, state_name): View Source

    13	def add_isomorph( self, state_name ) :
    14		self.isomorphs.add( state_name )