Esempio n. 1
0
 def __init__(self, key):
     self.idvalue = key
     self.connection = []
     self.edge = custom_arr.Custom_Arr(itemtype=Edge)
     self.influx = []  # other nodes that point to this node
     self.outflux = []  # nodes that this nodes points to
     self.path = 0
Esempio n. 2
0
 def __init__(self, size, graphtype='undirected'):  # undirected by default
     self.idlist = []
     self.size = 0
     self.checklist = np.zeros(self.size)
     self.timelist = []
     self.nodes = np.empty(size, dtype=Vertex)
     self.edges = custom_arr.Custom_Arr(itemtype=Edge)
     if graphtype == 'directed':
         self.Gtype = 'D'
     if graphtype == 'undirected':
         self.Gtype = 'U'
Esempio n. 3
0
 def __init__(self, size):
     self.idlist = []
     self.size = size
     self.nodes = np.empty(size, dtype=Vertex)
     self.edges = custom_arr.Custom_Arr(itemtype=Edge)