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

Method deg_e_of_group

easygraph/classes/hypergraph.py:538–547  ·  view source on GitHub ↗

r"""Return the degree list of each hyperedge 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

536 return self.D_e._values().cpu().view(-1).numpy().tolist()
537
538 def deg_e_of_group(self, group_name: str) -> List[int]:
539 r"""Return the degree list of each hyperedge of the specified hyperedge group.
540
541 Args:
542 ``group_name`` (``str``): The name of the specified hyperedge group.
543 """
544 assert (
545 group_name in self.group_names
546 ), f"The specified {group_name} is not in existing hyperedge groups."
547 return self.D_e_of_group(group_name)._values().cpu().view(-1).numpy().tolist()
548
549 def nbr_e(self, v_idx: int) -> List[int]:
550 r"""Return the neighbor hyperedge list of the specified vertex.

Callers 1

test_deg_groupFunction · 0.80

Calls 1

D_e_of_groupMethod · 0.95

Tested by 1

test_deg_groupFunction · 0.64