Skip to content

NodeData

LielVaknin edited this page Jan 11, 2021 · 3 revisions

This class implemented in the node_data file which included in the src package. It represents the set of operations applicable on a node (vertex) in a directed weighted graph.

Variables in this class:

  • _ _ key - Represents the id of a node.
  • _ _ tag - Represents temporal data which can be used by algorithms.
  • _ _ pos - Represents the location of a node.

NodeData methods

  • def _ _ init _ _(self, key, pos) - This _ _ init _ _ method initializes all the variables mentioned above.
  • def get_id(self) - Returns the key (id) associated with this node.
  • def get_tag(self) - Returns temporal data which can be used by algorithms.
  • def set_tag(self, tag: int) - Sets temporal data which can be used by algorithms and returns 0 after setting.
  • def get_pos(self) - Returns the position (3D point) of the node.
  • def set_pos(self, pos) - Sets the position (3D point) of the node with a given position.
  • def _ _ str _ _(self) - Returns a string which represents the key of the node.
  • def _ _ copy _ _(self) - Performs a deep copy of the node.

Clone this wiki locally