view
NodeAttributeView
Dynamic view for accessing node attributes with NetworkX-like syntax.
Source code in src/torch_structure/data/view.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
__getitem__(attr)
Retrieves the attribute value for the node.
Source code in src/torch_structure/data/view.py
46 47 48 49 50 | |
__setitem__(attr, value)
Sets the attribute value for the node if the attribute exists.
Source code in src/torch_structure/data/view.py
52 53 54 55 56 57 58 | |
NodeView
Dynamic view for accessing nodes with NetworkX-like syntax.
Source code in src/torch_structure/data/view.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
items()
Return an iterator of (node_name, NodeAttributeView) pairs.
Source code in src/torch_structure/data/view.py
25 26 27 | |
keys()
Return the node names.
Source code in src/torch_structure/data/view.py
21 22 23 | |