MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / spatial_adj_matrix

Method spatial_adj_matrix

KVCOMM/graph/graph.py:94–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

92
93 @property
94 def spatial_adj_matrix(self):
95 matrix = np.zeros((len(self.nodes), len(self.nodes)))
96 for i, node1_id in enumerate(self.nodes):
97 for j, node2_id in enumerate(self.nodes):
98 if self.nodes[node2_id] in self.nodes[node1_id].spatial_successors:
99 matrix[i, j] = 1
100 return matrix
101
102 @property
103 def temporal_adj_matrix(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected