-
Notifications
You must be signed in to change notification settings - Fork 0
NodeData pyDocs
shaCode256 edited this page Mar 4, 2021
·
1 revision
def __init__(self):
"""
Constructor for NodeData. the key is defined by a general counter.
"""
def __repr__(self):
"""
Tostring method
"""
def setkey(self, key: int): # replaces the constructor NodeData(int key) in previous project """ Sets the given NodeData key @return """
def copyNodeData(self, n): """ Copy constructor. takes a NodeData named n and copies it into this self NodeData. @return """
def getKey(self):
"""
Returns the key (id) associated with this node.
@return
"""
def getWeight(self):
"""
Returns the weight associated with this node.
@return
"""
def setWeight(self, w: float):
"""
Allows changing this node's weight.
@param w - the new weight
"""
def getInfo(self):
"""
Returns the remark (meta data) associated with this node.
@return
"""
def setInfo(self, s):
"""
Allows changing the remark (meta data) associated with this node.
@param s
"""
def getTag(self):
"""
Temporal data (aka color: e,g, white, gray, black)
which can be used be algorithms
@return
"""
def setTag(self, t: float):
"""
Allows setting the "tag" value for temporal marking an node - common
practice for marking by algorithms.
@param t - the new value of the tag
"""
def getTagB(self):
"""
Allows getting the "tagB" value for temporal marking an node - common
practice for marking by algorithms.
@param t - the new value of the tag
"""
def setTagB(self, t):
# distance of weight, """"""whats the weight in the shortest path from the src up until this one (to dest)
"""
Allows setting the "tagB" value for temporal marking an node - common
practice for marking by algorithms.
@param t - the new value of the tag
"""
def setDub(self, e):
"""
This function sets the dub value of this NodeData
"""
def setCounter(self, count):
"""
This function sets the conuter of this NodeData.
"""