NodeData - AmitSheer/DWGraphWithAlgo GitHub Wiki
This class is used to represent a node in the graph
Fields
all fields are accessible to the user from getters and setters
- key - int
the key used to identify specific node - pos - tuple
the position of the node in the graph\ - dx - float
used for the positioning of the nodes in a graph if pos is empty - dy - float
used for the positioning of the nodes in a graph if pos is empty - parent - int
used in algorithms when running shortest path - dist - int
used in algorithms when running shortest path
Special Methods
Methods that are not getter or setter\
- distance(self, point: tuple) -> float
Calculates the distance between one point to the other