Last active
August 29, 2015 14:25
-
-
Save lildata/54ff6537f99432be1615 to your computer and use it in GitHub Desktop.
Hello loom : https://github.com/aysylu/loom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user=> (def g1 (weighted-digraph [:usr.1 :bro.1 1] [:usr.1 :itr.1 1] [:bro.1 :itr.1 0.5] [:itr.1 :prm.1 1] [:itr.1 :prm.2 1] [:usr.1 :bro.2 1] [:bro.2 :itr.2 1] [:itr.2 :prm.2 1])) | |
| #'user/g1 | |
| user=> (shortest-path g1 :usr:1 :prm:2) | |
| nil | |
| user=> (shortest-path g1 :usr.1 :prm.2) | |
| (:usr.1 :itr.1 :prm.2) | |
| user=> (bellman-ford g1 :usr.1) | |
| [{:itr.2 2, :itr.1 1, :bro.1 1, :prm.2 2, :bro.2 1, :prm.1 2, :usr.1 0} {:usr.1 (:usr.1), :prm.1 (:usr.1 :itr.1 :prm.1), :bro.2 (:usr.1 :bro.2), :prm.2 (:usr.1 :itr.1 :prm.2), :bro.1 (:usr.1 :bro.1), :itr.1 (:usr.1 :itr.1), :itr.2 (:usr.1 :bro.2 :itr.2)}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment