Created
March 15, 2011 19:06
-
-
Save rhz/871248 to your computer and use it in GitHub Desktop.
This file contains 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
(defn get-molecule [state mol] | |
(get-in state [:mixture mol] 0)) | |
(defn get-activities [state] ;; FIXME this fn takes upto 80% of the time | |
(into {} (for [{:keys [lhs rate] :as r} (:rxns state)] | |
[r (apply * rate (for [[mol freq] lhs] | |
(* (get-molecule state mol) freq)))]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment