Skip to content

Commit

Permalink
corrected unit tests to use new random-mtzig api
Browse files Browse the repository at this point in the history
  • Loading branch information
iraikov committed Jul 16, 2015
1 parent 0661048 commit 3ba1605
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions kd-tree.release-info
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
(uri targz "https://github.com/iraikov/chicken-kdtree/tarball/{egg-release}")
(uri files-list "http://code.call-cc.org/files-list?egg={egg-name};release={egg-release}" old-uri)

(release "4.12")
(release "4.11" old-uri)

2 changes: 1 addition & 1 deletion kd-tree.setup
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
`(,(dynld-name "kd-tree") ,(dynld-name "kd-tree.import") )

;; Assoc list with properties for your extension:
'((version 4.11)
'((version 4.12)
))
12 changes: 6 additions & 6 deletions tests/run.scm
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@


(define (test1)
(let ((n (inexact->exact 1e5)) (k 40) (r 0.2) (randst (random-mtzig:init)))
(let ((n (inexact->exact 1e5)) (k 40) (r 0.2) (randst (init)))

(let recur ((ntrials 1))

(let* ((xs (random-mtzig:f64vector-randn! n randst))
(ys (random-mtzig:f64vector-randn! n randst))
(zs (random-mtzig:f64vector-randn! n randst)))
(let* ((xs (f64vector-randn! n randst))
(ys (f64vector-randn! n randst))
(zs (f64vector-randn! n randst)))

(print "random coordinates generated...")

Expand All @@ -120,8 +120,8 @@
(dd (print "tree 1 constructed!"))
(t2 (time (with-instance ((<KdTree> KdTree3d)) (list->kd-tree pts2))))
(dd (print "tree 2 constructed!"))
(xi1 (inexact->exact (modulo (random-mtzig:random! randst) n)))
(xi2 (inexact->exact (modulo (random-mtzig:random! randst) n)))
(xi1 (inexact->exact (modulo (random! randst) n)))
(xi2 (inexact->exact (modulo (random! randst) n)))
(x1 (list-ref pts1 xi1))
(x2 (list-ref pts2 xi2))
(xx1 (with-instance ((<Point> Point3d))
Expand Down

0 comments on commit 3ba1605

Please sign in to comment.