Skip to content

Commit

Permalink
Minor change. Removed newPriorityQueue method from AIDijkstra.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Mar 5, 2024
1 parent b4ab38c commit 3c68c3a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/AI-Algorithms-Graph/AIDijkstra.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ AIDijkstra >> end: endModel [
end := (self findNode: endModel)
]

{ #category : 'actions' }
AIDijkstra >> newPriorityQueue [

"We use the Heap object defined in the SequenceableCollections package."

^ Heap new
]

{ #category : 'configuration' }
AIDijkstra >> nodeClass [

Expand Down Expand Up @@ -89,7 +81,7 @@ AIDijkstra >> reset [
AIDijkstra >> run [

| pq |
pq := self newPriorityQueue.
pq := Heap new.
pq sortBlock: [ :element1 :element2 | (element1 priority ) <= (element2 priority )].
start priority: 0.
pq add: start.
Expand Down

0 comments on commit 3c68c3a

Please sign in to comment.