(self, num_from: int, max_deg: int)
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected