Dijkstra's algorithm: Difference between revisions

Content added Content deleted
Line 1,480: Line 1,480:
<lang CafeOBJ>
<lang CafeOBJ>
"
"
This code works with CafeOBJ 1.5.5(PigNose0.99).
This code works with CafeOBJ 1.5.1 and CafeOBJ 1.5.5.
Save this file as DijkstraRosetta.cafe.
Save this file as DijkstraRosetta.cafe.
To run the file type
To run the file type
Line 1,552: Line 1,552:
op connectedList___ : EdgeList Character EdgeList -> EdgeList
op connectedList___ : EdgeList Character EdgeList -> EdgeList
op unvisitedList__ : EdgeList EdgeList -> EdgeList
op unvisitedList__ : EdgeList EdgeList -> EdgeList
op shortestPath__ : Int EdgeList -> PathList
op SP___ : Character Character EdgeList -> PathList
op SP___ : Character Character EdgeList -> PathList