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

Method layer_nodes

graphlearn/python/data/values.py:708–715  ·  view source on GitHub ↗

Get `Nodes` of the given `Layer`.

(self, layer_id)

Source from the content-addressed store, hash-verified

706 raise ValueError("layer id beyond the layers length.")
707
708 def layer_nodes(self, layer_id):
709 """ Get `Nodes` of the given `Layer`.
710 """
711 layer_id -= 1
712 if isinstance(self.layers, list) and layer_id < len(self.layers):
713 return self.layers[layer_id].nodes
714 else:
715 raise ValueError("layer id beyond the layers length.")
716
717 def layer_edges(self, layer_id):
718 """ Get `Edges` 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