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

Method deg_v_of_group

easygraph/classes/hypergraph.py:522–531  ·  view source on GitHub ↗

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

520 return self.D_v._values().cpu().view(-1).numpy().tolist()
521
522 def deg_v_of_group(self, group_name: str) -> List[int]:
523 r"""Return the degree list of each vertex of the specified hyperedge group.
524
525 Args:
526 ``group_name`` (``str``): The name of the specified hyperedge group.
527 """
528 assert (
529 group_name in self.group_names
530 ), f"The specified {group_name} is not in existing hyperedge groups."
531 return self.D_v_of_group(group_name)._values().cpu().view(-1).numpy().tolist()
532
533 @property
534 def deg_e(self) -> List[int]:

Callers 1

test_deg_groupFunction · 0.80

Calls 1

D_v_of_groupMethod · 0.95

Tested by 1

test_deg_groupFunction · 0.64