local2global.utils.Patch¶
- class Patch[source]¶
Bases:
object
Class for patch embedding
- __init__(nodes, coordinates)[source]¶
Initialise a patch from a list of nodes and corresponding coordinates
- Parameters
nodes – Iterable of integer node indeces for patch
coordinates – Array-like of node coordinates of shape (len(nodes), dim)
Methods
Initialise a patch from a list of nodes and corresponding coordinates
get coordinate for a single node
get coordinates for a list of nodes
Attributes
coordinates
patch embedding coordinates
index
mapping of node index to patch coordinate index
shape
shape of patch coordinates