MCPcopy Create free account
hub / github.com/alibaba/graph-learn / _construct_edge_source

Method _construct_edge_source

graphlearn/python/graph.py:880–894  ·  view source on GitHub ↗
(self,
                             path,
                             edge_type,
                             decoder,
                             direction=pywrap.Direction.ORIGIN,
                             option=None)

Source from the content-addressed store, hash-verified

878 return source
879
880 def _construct_edge_source(self,
881 path,
882 edge_type,
883 decoder,
884 direction=pywrap.Direction.ORIGIN,
885 option=None):
886 source = pywrap.EdgeSource()
887 if isinstance(edge_type, tuple) and len(edge_type) == 3:
888 source.src_id_type, source.dst_id_type, source.edge_type = edge_type
889 else:
890 raise ValueError("edge_type param for .edge must be a tuple with "
891 "(src_type, dst_type, edge_type)")
892 source.direction = direction
893 self._common_construct_source(source, path, decoder, option)
894 return source
895
896 def _common_construct_source(self, source, path, decoder, option=None):
897 """Construct pywrap.Source

Callers 2

edgeMethod · 0.95
add_reverse_edgesMethod · 0.95

Calls 2

EdgeSourceMethod · 0.80

Tested by

no test coverage detected