def delta_minus(self, nodes):
'''
Returns the list of edges backwarding from a set of nodes
'''
bool_indices_head = np.array([x[0] not in nodes for x in self.edges])
bool_indices_tail = np.array([x[1] 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]
评论列表
文章目录