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

Method H_v2e_of_group

easygraph/classes/base.py:571–584  ·  view source on GitHub ↗

r"""Return the hypergraph incidence matrix with ``sparse matrix`` format in 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

569 return self.cache["H_v2e"]
570
571 def H_v2e_of_group(self, group_name: str) -> torch.Tensor:
572 r"""Return the hypergraph incidence matrix with ``sparse matrix`` format in the specified hyperedge group.
573
574 Args:
575 ``group_name`` (``str``): The name of the specified hyperedge group.
576 """
577 assert (
578 group_name in self.group_names
579 ), f"The specified {group_name} is not in existing hyperedge groups."
580 if self.group_cache[group_name].get("H_v2e") is None:
581 self.group_cache[group_name]["H_v2e"] = self._fetch_H_of_group(
582 "v2e", group_name
583 )
584 return self.group_cache[group_name]["H_v2e"]
585
586 @property
587 def H_e2v(self) -> torch.Tensor:

Callers 2

H_v2eMethod · 0.95
H_of_groupMethod · 0.80

Calls 1

_fetch_H_of_groupMethod · 0.95

Tested by

no test coverage detected