local2global.utils.Patch¶
- class Patch[source]¶
Bases:
objectClass 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
coordinatespatch embedding coordinates
indexmapping of node index to patch coordinate index
shapeshape of patch coordinates