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

Method v2e_src_of_group

easygraph/classes/hypergraph.py:647–656  ·  view source on GitHub ↗

r"""Return the source vertex index vector :math:`\overrightarrow{v2e}_{src}` of the connections (vertices point to hyperedges) 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

645 return self.H_T._indices()[1].clone()
646
647 def v2e_src_of_group(self, group_name: str) -> torch.Tensor:
648 r"""Return the source vertex index vector :math:`\overrightarrow{v2e}_{src}` of the connections (vertices point to hyperedges) in the specified hyperedge group.
649
650 Args:
651 ``group_name`` (``str``): The name of the specified hyperedge group.
652 """
653 assert (
654 group_name in self.group_names
655 ), f"The specified {group_name} is not in existing hyperedge groups."
656 return self.H_T_of_group(group_name)._indices()[1].clone()
657
658 @property
659 def v2e_dst(self) -> torch.Tensor:

Callers 1

test_v2e_index_groupFunction · 0.80

Calls 2

H_T_of_groupMethod · 0.95
cloneMethod · 0.45

Tested by 1

test_v2e_index_groupFunction · 0.64