ummels.de

Programmierung

Dijkstra in Scala

Dijkstra’s algorithm is a fundamental graph algorithm, which allows to compute the shortest path from a source node to a target node in a directed, weighted graph, i.e. the path with the smallest accumulated weight.

Priority Maps in Scala

In many algorithms—including Dijkstra’s algorithm for finding the shortest path between two vertices in a weighted graph—we need access to a data structure that maps elements to numbers or priorities where we can efficiently obtain and remove the element(s) with the least priority and add new elements as the algorithm progresses.

Dijkstra in Clojure

To set the tone for future posts, today I’d like to discuss Clojure. In short, Clojure is a Lisp dialect that targets the Java Virtual machine, so you can use all the Java libraries out there.