Class: GraphNode

GraphNode(i, j, x, y)

GraphNode (name)

Constructor

new GraphNode(i, j, x, y)

Constructs a new instance of GraphNode.
Parameters:
Name Type Description
i Integer Lattice Index corresponding to the r1 lattice vector
j Integer Lattice Index corresponding to the r1 lattice vector
x float x Coordinate corresponding to the position of the node in pixel coordinates on the canvas.
y float y Coordinate corresponding to the position of the node in pixel coordinates on the canvas.
Source:

Methods

setNeighbours(neighbourList)

Sets the neighbours list.
Parameters:
Name Type Description
neighbourList Array.<Array.<Integers>> The neighbour list . Each neighbour should have 2 elements corresponding to the lattice vectors. Example neighbour list for the node [0,0] is: [[0, 1], [0, -1], [1, 0], [-1, 0]]
Source:

Documentation generated by JSDoc 3.6.3 on Sun Jun 05 2022 19:55:55 GMT+0100 (BST)