1
0
Fork 0
Old engine for Continuous Time Bayesian Networks. Superseded by reCTBN. 🐍 https://github.com/madlabunimib/PyCTBN
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
PyCTBN/main_package/classes/node.py

21 lines
465 B

class Node():
def __init__(self, state_id, node_id=-1):
self.state_id = state_id
self.node_id = node_id
def __key(self):
return (self.state_id)
def __hash__(self):
return hash(self.__key())
def __eq__(self, other):
if isinstance(other, Node):
return self.__key() == other.__key()
return NotImplemented
def __repr__(self):
return "<%s, %d>"% (self.state_id, self.node_id)