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

Method clone

easygraph/classes/hypergraph.py:141–147  ·  view source on GitHub ↗

r"""Return a copy of the hypergraph.

(self)

Source from the content-addressed store, hash-verified

139 return super().clear()
140
141 def clone(self) -> "Hypergraph":
142 r"""Return a copy of the hypergraph."""
143 hg = Hypergraph(self.num_v, device=self.device)
144 hg._raw_groups = deepcopy(self._raw_groups)
145 hg.cache = deepcopy(self.cache)
146 hg.group_cache = deepcopy(self.group_cache)
147 return hg
148
149 def to(self, device: torch.device):
150 r"""Move the hypergraph to the specified device.

Callers 15

v2e_srcMethod · 0.45
v2e_src_of_groupMethod · 0.45
v2e_dstMethod · 0.45
v2e_dst_of_groupMethod · 0.45
v2e_weightMethod · 0.45
v2e_weight_of_groupMethod · 0.45
e2v_srcMethod · 0.45
e2v_src_of_groupMethod · 0.45
e2v_dstMethod · 0.45
e2v_dst_of_groupMethod · 0.45
e2v_weightMethod · 0.45

Calls 1

HypergraphClass · 0.85

Tested by

no test coverage detected