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

Method nbr_v_of_group

easygraph/classes/hypergraph.py:577–587  ·  view source on GitHub ↗

r"""Return the neighbor vertex list of the specified hyperedge of the specified hyperedge group. Args: ``e_idx`` (``int``): The index of the hyperedge. ``group_name`` (``str``): The name of the specified hyperedge group.

(self, e_idx: int, group_name: str)

Source from the content-addressed store, hash-verified

575 return self.N_v(e_idx).cpu().numpy().tolist()
576
577 def nbr_v_of_group(self, e_idx: int, group_name: str) -> List[int]:
578 r"""Return the neighbor vertex list of the specified hyperedge of the specified hyperedge group.
579
580 Args:
581 ``e_idx`` (``int``): The index of the hyperedge.
582 ``group_name`` (``str``): The name of the specified hyperedge group.
583 """
584 assert (
585 group_name in self.group_names
586 ), f"The specified {group_name} is not in existing hyperedge groups."
587 return self.N_v_of_group(e_idx, group_name).cpu().numpy().tolist()
588
589 @property
590 def num_groups(self) -> int:

Callers 1

test_nbr_groupFunction · 0.80

Calls 1

N_v_of_groupMethod · 0.95

Tested by 1

test_nbr_groupFunction · 0.64