r"""Fetch the W matrix of the specified hyperedge group with ``torch.sparse_coo_tensor`` format. Args: ``group_name`` (``str``): The name of the group.
(self, group_name: str)
| 294 | return R |
| 295 | |
| 296 | def _fetch_W_of_group(self, group_name: str): |
| 297 | r"""Fetch the W matrix of the specified hyperedge group with ``torch.sparse_coo_tensor`` format. |
| 298 | |
| 299 | Args: |
| 300 | ``group_name`` (``str``): The name of the group. |
| 301 | """ |
| 302 | assert ( |
| 303 | group_name in self.group_names |
| 304 | ), f"The specified {group_name} is not in existing hyperedge groups." |
| 305 | w_list = [content["w_e"] for content in self._raw_groups[group_name].values()] |
| 306 | W = torch.tensor(w_list, device=self.device).view((-1, 1)) |
| 307 | return W |
| 308 | |
| 309 | # some structure modification functions |
| 310 | def add_hyperedges( |
no outgoing calls
no test coverage detected