Mercurial > pokemon-types
changeset 20:47fa6dc56e30
remove incanter filth.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 10 Mar 2013 19:17:47 +0000 |
parents | a69ddac5657e |
children | f88b7d2c25d9 |
files | org/lpsolve.org |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/org/lpsolve.org Tue Feb 26 16:32:56 2013 +0000 1.2 +++ b/org/lpsolve.org Sun Mar 10 19:17:47 2013 +0000 1.3 @@ -158,7 +158,7 @@ 1.4 (ns pokemon.lpsolve 1.5 (:import lpsolve.LpSolve) 1.6 (:require pokemon.types) 1.7 - (:require incanter.core) 1.8 + ;;(:require incanter.core) 1.9 (:require rlm.map-utils)) 1.10 #+end_src 1.11 1.12 @@ -561,10 +561,10 @@ 1.13 ;; we have to clamp the Infinities to a more reasonable negative 1.14 ;; value because lp_solve does not play well with infinities in its 1.15 ;; constraint matrix. 1.16 - (map (fn [row] (map #(if (= Double/NEGATIVE_INFINITY %) -1e3 %) row)) 1.17 - (incanter.core/log2 1.18 - (incanter.core/trans 1.19 - matrix)))) 1.20 + (map (fn [row] (map #(if (= Double/NEGATIVE_INFINITY %) -1e3 %) 1.21 + (map #(/ (Math/log %) (Math/log 2)) row))) 1.22 + (apply mapv vector ;; transpose 1.23 + matrix))) 1.24 1.25 ;; constraint matrices 1.26 (defn log-defense-matrix [] 1.27 @@ -573,7 +573,7 @@ 1.28 (pokemon.types/type-names))))) 1.29 1.30 (defn log-attack-matrix [] 1.31 - (incanter.core/trans (log-defense-matrix))) 1.32 + (apply mapv vector (log-defense-matrix))) 1.33 1.34 ;; target vectors 1.35 (defn all-resistant []