add missing file from previous push
This commit is contained in:
parent
566f3fbbf4
commit
ac855bcd9a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user