(defun update (aNum name &optional (distribution *dists*)) (let* ((dist-val (gethash name distribution)) (max (dist9-max dist-val)) (min (dist9-min dist-val)) (pd (dist9-distribution dist-val))) "pd = probability distribution" ; (print `(before ,dist-val)) (if (= aNum min) (let ((y (setf (aref pd 0) (let ((x (aref pd 0))) (incf x))))) pd) (progn "binNum = bin number of aNum" (let* ((b (length pd)) (binNum (ceiling (/(- aNum min) (/ (- max min) b)))) (binIn (let ((x (aref pd (- binNum 1)))) (incf x))) (binUp (setf (aref pd (- binNum 1)) binIn))) pd)))))