MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / W_e_of_group

Method W_e_of_group

easygraph/classes/base.py:536–547  ·  view source on GitHub ↗

r"""Return the hyperedge weight matrix of the specified hyperedge group. Args: ``group_name`` (``str``): The name of the specified hyperedge group.

(self, group_name: str)

Source from the content-addressed store, hash-verified

534 return self.cache["W_e"]
535
536 def W_e_of_group(self, group_name: str) -> torch.Tensor:
537 r"""Return the hyperedge weight matrix of the specified hyperedge group.
538
539 Args:
540 ``group_name`` (``str``): The name of the specified hyperedge group.
541 """
542 assert (
543 group_name in self.group_names
544 ), f"The specified {group_name} is not in existing hyperedge groups."
545 if self.group_cache[group_name]["W_e"] is None:
546 self.group_cache[group_name]["W_e"] = self._fetch_W_of_group(group_name)
547 return self.group_cache[group_name]["W_e"]
548
549 @property
550 @abc.abstractmethod

Callers 5

W_eMethod · 0.95
test_W_e_groupFunction · 0.45
test_L_HGNN_groupFunction · 0.45
test_L_sym_groupFunction · 0.45
test_L_rw_groupFunction · 0.45

Calls 1

_fetch_W_of_groupMethod · 0.95

Tested by 4

test_W_e_groupFunction · 0.36
test_L_HGNN_groupFunction · 0.36
test_L_sym_groupFunction · 0.36
test_L_rw_groupFunction · 0.36