mirror of
https://github.com/2martens/uni.git
synced 2026-05-06 11:26:25 +02:00
AD-5: 4a verbessert.
This commit is contained in:
@ -84,10 +84,8 @@ Jim Martens (6420323)}
|
||||
while (!empty(queue))
|
||||
current = queue.dequeue()
|
||||
parent = current.parent
|
||||
// wähle eines von beiden, abhängig davon,
|
||||
// ob die Länge sich auf die Kanten oder die Gewichtungen bezieht (TBD)
|
||||
distance = parent.getDistance() + w(parent,current)
|
||||
distance = parent.getDistance() + 1
|
||||
distance = parent.getDistance() + w(parent,current)
|
||||
current.setDistance(distance)
|
||||
if (distance > longestPath)
|
||||
longestPath = distance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user