r"""Return the neighbor vertices of the specified hyperedge of the specified hyperedge group with ``torch.Tensor`` format. .. note:: The ``e_idx`` must be in the range of [0, :func:`num_e_of_group`). Args: ``e_idx`` (``int``): The index of the hyperedge.
(self, e_idx: int, group_name: str)
| 1048 | e_idx -= self.num_e_of_group(name) |
| 1049 | |
| 1050 | def N_v_of_group(self, e_idx: int, group_name: str) -> torch.Tensor: |
| 1051 | r"""Return the neighbor vertices of the specified hyperedge of the specified hyperedge group with ``torch.Tensor`` format. |
| 1052 | |
| 1053 | .. note:: |
| 1054 | The ``e_idx`` must be in the range of [0, :func:`num_e_of_group`). |
| 1055 | |
| 1056 | Args: |
| 1057 | ``e_idx`` (``int``): The index of the hyperedge. |
| 1058 | ``group_name`` (``str``): The name of the specified hyperedge group. |
| 1059 | """ |
| 1060 | assert ( |
| 1061 | group_name in self.group_names |
| 1062 | ), f"The specified {group_name} is not in existing hyperedge groups." |
| 1063 | assert e_idx < self.num_e_of_group(group_name) |
| 1064 | v_indices = self.H_T_of_group(group_name)[e_idx]._indices()[0] |
| 1065 | return v_indices.clone() |
| 1066 | |
| 1067 | # ===================================================================================== |
| 1068 | # spectral-based convolution/smoothing |