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

Method __init__

Module/Map/Graph.py:174–177  ·  view source on GitHub ↗
(self, num_from: int, max_deg: int)

Source from the content-addressed store, hash-verified

172 memory footprint.
173 """
174 def __init__(self, num_from: int, max_deg: int) -> None:
175 self.ranges = torch.ones((num_from, max_deg, 2), dtype=torch.long) * -1
176 self.num_ranges = torch.zeros((num_from,), dtype=torch.long)
177 self.max_deg = max_deg
178
179 def add(self, from_idx: torch.Tensor, to_idx_start: torch.Tensor, to_idx_length: torch.Tensor):
180 self.ranges[from_idx, self.num_ranges[from_idx], 0] = to_idx_start

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected