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

Method __init__

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

Source from the content-addressed store, hash-verified

135 An arbitrary one-to-multi mapping relationship.
136 """
137 def __init__(self, num_from: int, max_deg: int):
138 self.out_deg = torch.zeros((num_from,), dtype=torch.long)
139 self.edges = torch.ones((num_from, max_deg), dtype=torch.long) * -1
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected