add missing file from previous push

This commit is contained in:
Burke Fetscher 2014-10-08 11:51:45 -05:00
parent 566f3fbbf4
commit ac855bcd9a

View File

@ -199,13 +199,13 @@
(define get-dist (define get-dist
(let ([cache (make-hash)]) (let ([cache (make-hash)])
(λ (l depth max-depth) (λ (l depth max-depth)
(hash-ref cache (list l depth max-depth) (hash-ref cache (list (length l) depth max-depth)
(λ () (λ ()
(define nperms (factorial (length l))) (define nperms (factorial (length l)))
(define d (binomial-dist (sub1 nperms) (define d (binomial-dist (sub1 nperms)
(+ (/ depth max-depth) (+ (/ depth max-depth)
(* 0.05 (- 0.5 (/ depth max-depth)))))) (* 0.05 (- 0.5 (/ depth max-depth))))))
(hash-set! cache d (list l depth max-depth)) (hash-set! cache (list (length l) depth max-depth) d)
d))))) d)))))
(define (nth-lexico-perm len n) (define (nth-lexico-perm len n)