Changeset 14471 in project


Ignore:
Timestamp:
04/27/09 03:11:34 (10 years ago)
Author:
Ivan Raikov
Message:

random-mtzig copied to release/4 and ported to Chicken 4

Location:
release/4/random-mtzig
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/random-mtzig/trunk/randmtzig.c

    r6750 r14471  
    5050     variants of each routine.
    5151
    52    2007-09-20  Ivan Raikov  <iraikov@ece.gatech.edu>
     52   2007-09-20  Ivan Raikov  <ivan.g.raikov@gmail.com>
    5353   Adapted for use in Chicken Scheme.
    5454
  • release/4/random-mtzig/trunk/random-mtzig-eggdoc.scm

    r7358 r14471  
    88     (description "An implementation of the MT19937 random number generator with Marsaglia and Tang's Ziggurat algorithm to generate random numbers from a non-uniform distribution.")
    99
    10      (author (url "http://chicken.wiki.br/ivan raikov" "Ivan Raikov"))
     10     (author (url "http://chicken.wiki.br/users/ivan-raikov" "Ivan Raikov"))
    1111
    1212     (history
     13      (version "2.8" "Ported to Chicken 4")
    1314      (version "2.7" "Added binomial sampling procedures")
    1415      (version "2.6" "Build script updated for better cross-platform compatibility")
     
    122123
    123124     (license
    124       "Chicken Scheme egg scripts and documentation Copyright 2007 Ivan Raikov.
     125      "Chicken Scheme egg scripts and documentation Copyright 2007-2009 Ivan Raikov.
    125126
    126127   Coded by Takuji Nishimura and Makoto Matsumoto.
  • release/4/random-mtzig/trunk/random-mtzig.meta

    r6119 r14471  
     1;;;; -*- Hen -*-
     2
    13((egg "random-mtzig.egg") ; This should never change
    24
  • release/4/random-mtzig/trunk/random-mtzig.scm

    r6750 r14471  
    11
    2 (define-extension random-mtzig)
     2(module random-mtzig
     3 
     4  (random-mtzig:init
     5   random-mtzig:random!
     6   random-mtzig:randu!
     7   random-mtzig:randn!
     8   random-mtzig:rande!
     9   random-mtzig:randb!
     10   random-mtzig:f64vector-randu!
     11   random-mtzig:f64vector-randn!
     12   random-mtzig:f64vector-rande!
     13   random-mtzig:f64vector-randb!
     14   random-mtzig:f32vector-randu!
     15   random-mtzig:f32vector-randn!
     16   random-mtzig:f32vector-rande!
     17   random-mtzig:f32vector-randb!
     18   )
    319
    4 (require-extension srfi-4)
     20  (import scheme chicken foreign )
     21
     22  (require-extension srfi-4 easyffi)
     23
    524
    625#>!
     
    164183    v))
    165184
    166 
    167 
     185)
  • release/4/random-mtzig/trunk/random-mtzig.setup

    r6750 r14471  
    1 
    2 (define has-exports? (string>=? (chicken-version) "2.310"))
     1;;;; -*- Hen -*-
    32
    43(define (dynld-name fn)         
    54  (make-pathname #f fn ##sys#load-dynamic-extension))   
    65
    7 (compile -O -d2 -X easyffi -s -o ,(dynld-name "random-mtzig")
    8          ,@(if has-exports? '(-check-imports -emit-exports random-mtzig.exports) '())
    9          random-mtzig.scm randmtzig.c -lchicken -ldl -lm)
     6(compile -O -d2 -X easyffi -s random-mtzig.scm randmtzig.c -j random-mtzig)
     7(compile -O -d2 -s random-mtzig.import.scm)
    108
    119(run (csi -qbs random-mtzig-eggdoc.scm > random-mtzig.html))
     
    1715
    1816  ; Files to install for your extension:
    19   `(,(dynld-name "random-mtzig") "random-mtzig.html"
    20     ,@(if has-exports? '("random-mtzig.exports") (list)) )
     17  `(,(dynld-name "random-mtzig") ,(dynld-name "random-mtzig.import")
     18    "random-mtzig.html"
     19    )
    2120
    2221  ; Assoc list with properties for your extension:
    23   `((version 2.7)
     22  `((version 2.8)
    2423    (documentation "random-mtzig.html")
    25     ,@(if has-exports? `((exports "random-mtzig.exports")) (list)) ))
     24    ))
Note: See TracChangeset for help on using the changeset viewer.