r"""Return the neighbor hyperedges of the specified vertex with ``torch.Tensor`` format. .. note:: The ``v_idx`` must be in the range of [0, :attr:`num_v`). Args: ``v_idx`` (``int``): The index of the vertex.
(self, v_idx: int)
| 999 | return self.group_cache[group_name]["D_e_neg_1"] |
| 1000 | |
| 1001 | def N_e(self, v_idx: int) -> torch.Tensor: |
| 1002 | r"""Return the neighbor hyperedges of the specified vertex with ``torch.Tensor`` format. |
| 1003 | |
| 1004 | .. note:: |
| 1005 | The ``v_idx`` must be in the range of [0, :attr:`num_v`). |
| 1006 | |
| 1007 | Args: |
| 1008 | ``v_idx`` (``int``): The index of the vertex. |
| 1009 | """ |
| 1010 | assert v_idx < self.num_v |
| 1011 | _tmp, e_bias = [], 0 |
| 1012 | for name in self.group_names: |
| 1013 | _tmp.append(self.N_e_of_group(v_idx, name) + e_bias) |
| 1014 | e_bias += self.num_e_of_group(name) |
| 1015 | return torch.cat(_tmp, dim=0) |
| 1016 | |
| 1017 | def N_e_of_group(self, v_idx: int, group_name: str) -> torch.Tensor: |
| 1018 | r"""Return the neighbor hyperedges of the specified vertex of the specified hyperedge group with ``torch.Tensor`` format. |