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

Method layer_edges

graphlearn/python/data/values.py:717–724  ·  view source on GitHub ↗

Get `Edges` of the given `Layer`.

(self, layer_id)

Source from the content-addressed store, hash-verified

715 raise ValueError("layer id beyond the layers length.")
716
717 def layer_edges(self, layer_id):
718 """ Get `Edges` of the given `Layer`.
719 """
720 layer_id -= 1
721 if isinstance(self.layers, list) and layer_id < len(self.layers):
722 return self.layers[layer_id].edges
723 else:
724 raise ValueError("layer id beyond the layers length.")
725
726 def set_layer_nodes(self, layer_id, nodes):
727 """ Set `Nodes` of the given `Layer`.

Callers 15

test_1hopMethod · 0.80
test_1hopMethod · 0.80
test_2hopMethod · 0.80
test_1hopMethod · 0.80
test_2hopMethod · 0.80
test_1hopMethod · 0.80

Calls

no outgoing calls

Tested by 15

test_1hopMethod · 0.64
test_1hopMethod · 0.64
test_2hopMethod · 0.64
test_1hopMethod · 0.64
test_2hopMethod · 0.64
test_1hopMethod · 0.64