# HG changeset patch # User Robert McIntyre # Date 1362943067 0 # Node ID 47fa6dc56e30182c5bbe0a33ae31544ee31cad6e # Parent a69ddac5657e354e015b86ef4bf147343655c9a2 remove incanter filth. diff -r a69ddac5657e -r 47fa6dc56e30 org/lpsolve.org --- a/org/lpsolve.org Tue Feb 26 16:32:56 2013 +0000 +++ b/org/lpsolve.org Sun Mar 10 19:17:47 2013 +0000 @@ -158,7 +158,7 @@ (ns pokemon.lpsolve (:import lpsolve.LpSolve) (:require pokemon.types) - (:require incanter.core) + ;;(:require incanter.core) (:require rlm.map-utils)) #+end_src @@ -561,10 +561,10 @@ ;; we have to clamp the Infinities to a more reasonable negative ;; value because lp_solve does not play well with infinities in its ;; constraint matrix. - (map (fn [row] (map #(if (= Double/NEGATIVE_INFINITY %) -1e3 %) row)) - (incanter.core/log2 - (incanter.core/trans - matrix)))) + (map (fn [row] (map #(if (= Double/NEGATIVE_INFINITY %) -1e3 %) + (map #(/ (Math/log %) (Math/log 2)) row))) + (apply mapv vector ;; transpose + matrix))) ;; constraint matrices (defn log-defense-matrix [] @@ -573,7 +573,7 @@ (pokemon.types/type-names))))) (defn log-attack-matrix [] - (incanter.core/trans (log-defense-matrix))) + (apply mapv vector (log-defense-matrix))) ;; target vectors (defn all-resistant []