Skip to content

Instantly share code, notes, and snippets.

Matthew Gilliard mjg123

Block or report user

Report or block mjg123

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mjg123 / dijkstra-core.clj
Created May 29, 2012 — forked from mantree/dijkstra-core.clj
Brisfunctional dojo code implementing dijkstra's algorithm 29-05-2012
View dijkstra-core.clj
(ns dijkstra.core)
(def initial-node {:score Integer/MAX_VALUE :route [] :dead? false})
(defn make-initial-state [edges start-node]
(-> (zipmap (keys edges) (repeat initial-node))
(assoc-in [start-node :score] 0)
(assoc-in [start-node :route] [start-node])))
(defn live-nodes [state]
You can’t perform that action at this time.