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

Method H_of_group

easygraph/classes/hypergraph.py:751–762  ·  view source on GitHub ↗

r"""Return the hypergraph incidence matrix :math:`\mathbf{H}` of the specified hyperedge group with ``torch.Tensor`` format. Args: ``group_name`` (``str``): The name of the specified hyperedge group.

(self, group_name: str)

Source from the content-addressed store, hash-verified

749 return self.cache["H"]
750
751 def H_of_group(self, group_name: str) -> torch.Tensor:
752 r"""Return the hypergraph incidence matrix :math:`\mathbf{H}` of the specified hyperedge group with ``torch.Tensor`` format.
753
754 Args:
755 ``group_name`` (``str``): The name of the specified hyperedge group.
756 """
757 assert (
758 group_name in self.group_names
759 ), f"The specified {group_name} is not in existing hyperedge groups."
760 if self.group_cache[group_name].get("H") is None:
761 self.group_cache[group_name]["H"] = self.H_v2e_of_group(group_name)
762 return self.group_cache[group_name]["H"]
763
764 @property
765 def H_T(self) -> torch.Tensor:

Callers 9

e2v_src_of_groupMethod · 0.95
e2v_dst_of_groupMethod · 0.95
e2v_weight_of_groupMethod · 0.95
H_T_of_groupMethod · 0.95
D_v_of_groupMethod · 0.95
N_e_of_groupMethod · 0.95
L_rw_of_groupMethod · 0.95
L_HGNN_of_groupMethod · 0.95

Calls 1

H_v2e_of_groupMethod · 0.80

Tested by

no test coverage detected