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

  1. key - int
    the key used to identify specific node
  2. pos - tuple
    the position of the node in the graph\
  3. dx - float
    used for the positioning of the nodes in a graph if pos is empty
  4. dy - float
    used for the positioning of the nodes in a graph if pos is empty
  5. parent - int
    used in algorithms when running shortest path
  6. 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