def delta_plus(self, nodes):
'''
Returns the list of edges forwarding from a set of nodes
'''
bool_indices_head = np.array([x[0] in nodes for x in self.edges])
bool_indices_tail = np.array([x[1] not in nodes for x in self.edges])
bool_indices_edges = np.bitwise_and(
bool_indices_head, bool_indices_tail)
return self.edges[bool_indices_edges]
评论列表
文章目录