MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / add

Method add

Module/Map/Graph.py:142–145  ·  view source on GitHub ↗
(self, from_idx: torch.Tensor, to_idx: torch.Tensor)

Source from the content-addressed store, hash-verified

140 self.max_deg = max_deg
141
142 def add(self, from_idx: torch.Tensor, to_idx: torch.Tensor):
143 assert from_idx.shape == to_idx.shape
144 self.edges[from_idx, self.out_deg[from_idx]] = to_idx
145 self.out_deg[from_idx] += 1
146
147 def project(self, from_index: torch.Tensor) -> torch.Tensor:
148 to_idx = self.edges[from_index].flatten()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected