Changeset 34861 in project


Ignore:
Timestamp:
11/05/17 19:18:48 (4 years ago)
Author:
Kon Lovett
Message:

assume <key>: style for doc purposes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/srfi-27

    r34551 r34861  
    408408==== make-entropy-source/procedures
    409409
    410 <procedure>(make-entropy-source/procedures U8PROC F64PROC [#:name (NAME (gensym 'procedures-))] [#:docu (DOCU "Entropy from procedures")]) => entropy-source</procedure>
     410<procedure>(make-entropy-source/procedures U8PROC F64PROC [name: (NAME (gensym 'procedures-))] [docu: (DOCU "Entropy from procedures")]) => entropy-source</procedure>
    411411
    412412Returns an unregistered {{entropy-source}} built from the supplied {{U8PROC}}
     
    415415==== make-entropy-source/f64procedure
    416416
    417 <procedure>(make-entropy-source/f64procedure F64PROC [#:name (NAME (gensym 'procedures-))] [#:docu (DOCU "Entropy from procedures")]) => entropy-source</procedure>
     417<procedure>(make-entropy-source/f64procedure F64PROC [name: (NAME (gensym 'procedures-))] [docu: (DOCU "Entropy from procedures")]) => entropy-source</procedure>
    418418
    419419Returns an unregistered {{entropy-source}} built from the supplied {{F64PROC}}
     
    440440==== make-entropy-source/port
    441441
    442 <procedure>(make-entropy-source/port PORT [#:name (NAME (gensym 'port-))] [#:docu (DOCU "Entropy from an open port")]) => entropy-source</procedure>
     442<procedure>(make-entropy-source/port PORT [name: (NAME (gensym 'port-))] [docu: (DOCU "Entropy from an open port")]) => entropy-source</procedure>
    443443
    444444Returns an unregistered {{entropy-source}} built from the supplied {{PORT}},
     
    449449==== make-entropy-source/port-open
    450450
    451 <procedure>(make-entropy-source/port-open OPENER [#:name (NAME (gensym 'port-))] [#:docu (DOCU "Entropy from port")]) => entropy-source</procedure>
     451<procedure>(make-entropy-source/port-open OPENER [name: (NAME (gensym 'port-))] [docu: (DOCU "Entropy from port")]) => entropy-source</procedure>
    452452
    453453Returns an unregistered {{entropy-source}} built from the supplied {{OPENER}}.
     
    460460==== make-entropy-source/port-open-timed
    461461
    462 <procedure>(make-entropy-source/port-open-timed OPENER SECONDS [#:name (NAME (gensym 'timed-port-))] [#:docu (DOCU "Entropy from timed open port")]) => entropy-source</procedure>
     462<procedure>(make-entropy-source/port-open-timed OPENER SECONDS [name: (NAME (gensym 'timed-port-))] [docu: (DOCU "Entropy from timed open port")]) => entropy-source</procedure>
    463463
    464464Returns an unregistered {{entropy-source}} built from the supplied {{OPENER}} &
     
    471471==== make-entropy-source/file
    472472
    473 <procedure>(make-entropy-source/file NAMSTR [#:name (NAME (gensym 'file-))] [#:docu (DOCU (string-append "Entropy from file \"" namstr "\""))]) => entropy-source</procedure>
     473<procedure>(make-entropy-source/file NAMSTR [name: (NAME (gensym 'file-))] [docu: (DOCU (string-append "Entropy from file \"" namstr "\""))]) => entropy-source</procedure>
    474474
    475475Returns an unregistered {{entropy-source}} using the file named by the pathname
     
    494494==== make-uniform-random-integers
    495495
    496 <procedure>(make-uniform-random-integers [#:high (HIGH #f)] [#:low (LOW 0)] [#:precision (PRECISION 1)] [#:source (SOURCE (current-random-source))]) => (procedure () integer)</procedure>
     496<procedure>(make-uniform-random-integers [high: (HIGH #f)] [low: (LOW 0)] [precision: (PRECISION 1)] [source: (SOURCE (current-random-source))]) => (procedure () integer)</procedure>
    497497
    498498{{LOW}}, {{HIGH}} and {{PRECISION}} are {{integer}}s.
     
    512512==== make-uniform-random-reals
    513513
    514 <procedure>(make-uniform-random-reals [#:precision PRECISION] [#:source (SOURCE (current-random-source))]) => (procedure () real)</procedure>
     514<procedure>(make-uniform-random-reals [precision: PRECISION] [source: (SOURCE (current-random-source))]) => (procedure () real)</procedure>
    515515
    516516The generator is as {{(random-source-make-reals SOURCE PRECISION)}}.
     
    542542==== random-permutation!
    543543
    544 <procedure>(make-random-permutations [#:randoms (RANDOMS random-integer/current)]) => (procedure (integer) vector)</procedure>
    545 <procedure>(random-permutation! VECTOR [#:randoms (RANDOMS random-integer/current)]) => vector</procedure>
     544<procedure>(make-random-permutations [randoms: (RANDOMS random-integer/current)]) => (procedure (integer) vector)</procedure>
     545<procedure>(random-permutation! VECTOR [randoms: (RANDOMS random-integer/current)]) => vector</procedure>
    546546
    547547Performs the "Knuth shuffle" (or "Fisher-Yates shuffle").
     
    557557==== random-vector!
    558558
    559 <procedure>(make-random-vector [#:randoms (RANDOMS random-real/current)]) => (procedure (integer) vector)</procedure>
    560 <procedure>(random-vector! VECTOR% [#:randoms (RANDOMS random-real/current)]) => vector%</procedure>
     559<procedure>(make-random-vector [randoms: (RANDOMS random-real/current)]) => (procedure (integer) vector)</procedure>
     560<procedure>(random-vector! VECTOR% [randoms: (RANDOMS random-real/current)]) => vector%</procedure>
    561561
    562562Fills {{VECTOR}} with inexact real random numbers from the random distribution
     
    568568==== random-hollow-sphere!
    569569
    570 <procedure>(make-random-hollow-sphere [#:mu (MU 0.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure (integer) vector)</procedure>
    571 <procedure>(random-hollow-sphere! VECTOR% [#:mu (MU 0.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => vector%</procedure>
     570<procedure>(make-random-hollow-sphere [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure (integer) vector)</procedure>
     571<procedure>(random-hollow-sphere! VECTOR% [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => vector%</procedure>
    572572
    573573Fills {{VECTOR%}} with inexact real random numbers the sum of whose squares
     
    583583==== random-solid-sphere!
    584584
    585 <procedure>(make-random-solid-sphere [#:mu (MU 0.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure (integer) vector)</procedure>
    586 <procedure>(random-solid-sphere! VECTOR% [#:mu (MU 0.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => vector%</procedure>
     585<procedure>(make-random-solid-sphere [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure (integer) vector)</procedure>
     586<procedure>(random-solid-sphere! VECTOR% [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => vector%</procedure>
    587587
    588588Fills {{VECTOR%}} with inexact real random numbers the sum of whose squares
     
    614614==== make-random-normals
    615615
    616 <procedure>(make-random-normals [#:mu (MU 0.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     616<procedure>(make-random-normals [mu: (MU 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    617617
    618618{{MU}} is {{real}}.
     
    624624==== make-random-exponentials
    625625
    626 <procedure>(make-random-exponentials [#:mu (MU 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     626<procedure>(make-random-exponentials [mu: (MU 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    627627
    628628{{MU}} is {{real}} in [{{0}} {{1}}].
     
    632632==== make-random-triangles
    633633
    634 <procedure>(make-random-triangles [#:s (S 0.0)] [#:m (M 0.5)] [#:l (L 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     634<procedure>(make-random-triangles [s: (S 0.0)] [m: (M 0.5)] [l: (L 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    635635
    636636{{S}} is {{real}}.
     
    644644==== make-random-poissons
    645645
    646 <procedure>(make-random-poissons [#:mu (MU 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () integer)</procedure>
     646<procedure>(make-random-poissons [mu: (MU 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () integer)</procedure>
    647647
    648648{{MU}} is {{nonnegative-real}}.
     
    652652==== make-random-bernoullis
    653653
    654 <procedure>(make-random-bernoullis [#:p (P 0.5)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () boolean)</procedure>
     654<procedure>(make-random-bernoullis [p: (P 0.5)] [randoms: (RANDOMS (random-real/current))]) => (procedure () boolean)</procedure>
    655655
    656656{{P}} is {{real}} in [{{0}} {{1}}].
     
    660660==== make-random-binomials
    661661
    662 <procedure>(make-random-binomials [#:t (T 1)] [#:p (P 0.5)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () integer)</procedure>
     662<procedure>(make-random-binomials [t: (T 1)] [p: (P 0.5)] [randoms: (RANDOMS (random-real/current))]) => (procedure () integer)</procedure>
    663663
    664664{{T}} is {{cardinal-integer}}.
     
    670670==== make-random-geometrics
    671671
    672 <procedure>(make-random-geometrics [#:p (P 0.5)] [#:randoms (RANDOMS (random-real/current))])) => (procedure () integer)</procedure>
     672<procedure>(make-random-geometrics [p: (P 0.5)] [randoms: (RANDOMS (random-real/current))])) => (procedure () integer)</procedure>
    673673
    674674{{P}} is {{real}} in [{{0}} {{1}}].
     
    678678==== make-random-lognormals
    679679
    680 <procedure>(make-random-lognormals [#:mu (MU 1.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     680<procedure>(make-random-lognormals [mu: (MU 1.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    681681
    682682{{MU}} is {{nonzero-real}}.
     
    688688==== make-random-cauchys
    689689
    690 <procedure>(make-random-cauchys [#:median (MEDIAN 0.0)] [#:sigma (SIGMA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     690<procedure>(make-random-cauchys [median: (MEDIAN 0.0)] [sigma: (SIGMA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    691691
    692692{{MEDIAN}} is {{real}}.
     
    698698==== make-random-gammas
    699699
    700 <procedure>(make-random-gammas [#:alpha (ALPHA 1.0)] [#:theta (THETA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     700<procedure>(make-random-gammas [alpha: (ALPHA 1.0)] [theta: (THETA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    701701
    702702{{ALPHA}} is {{positive-real}}.
     
    708708==== make-random-erlangs
    709709
    710 <procedure>(make-random-erlangs [#:alpha (ALPHA 1)] [#:theta (THETA 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     710<procedure>(make-random-erlangs [alpha: (ALPHA 1)] [theta: (THETA 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    711711
    712712{{ALPHA}} is {{positive-real}}.
     
    718718==== make-random-paretos
    719719
    720 <procedure>(make-random-paretos [#:alpha (ALPHA 1.0)] [#:xmin (XMIN 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     720<procedure>(make-random-paretos [alpha: (ALPHA 1.0)] [xmin: (XMIN 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    721721
    722722{{ALPHA}} is {{positive-real}}.
     
    728728==== make-random-levys
    729729
    730 <procedure>(make-random-levys [#:gamma (GAMMA 1.0)] [#:delta (DELTA 0.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     730<procedure>(make-random-levys [gamma: (GAMMA 1.0)] [delta: (DELTA 0.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    731731
    732732{{GAMMA}} is {{nonnegative-real}}.
     
    738738==== make-random-weibulls
    739739
    740 <procedure>(make-random-weibulls [#:shape (SHAPE 1.0)] [#:scale (SCALE 1.0)] [#:randoms (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
     740<procedure>(make-random-weibulls [shape: (SHAPE 1.0)] [scale: (SCALE 1.0)] [randoms: (RANDOMS (random-real/current))]) => (procedure () real)</procedure>
    741741
    742742{{SHAPE}} is {{positive-real}}.
     
    768768        (random-source-entropy-source-set! rs new-es) )
    769769      (lambda ()
    770         (let* ((rnd (make-uniform-random-integers #:low (- k) #:high (+ k) #:precision 2 #:source rs) )
    771                (vecgen (make-random-vector #:randoms rnd) ) )
     770        (let* ((rnd (make-uniform-random-integers low: (- k) high: (+ k) precision: 2 source: rs) )
     771               (vecgen (make-random-vector randoms: rnd) ) )
    772772          (lambda (#!optional (k k)) (vecgen k)) ) )
    773773      (lambda ()
     
    783783  (make-entropy-source/f64procedure
    784784    (constantly (exact->inexact n))
    785     #:name (string->uninterned-symbol (conc "entropy-constant-" n))
    786     #:docu (conc "Entropy constant " n)) )
     785    name: (string->uninterned-symbol (conc "entropy-constant-" n))
     786    docu: (conc "Entropy constant " n)) )
    787787</enscript>
    788788
     
    795795(define-generic (name obj))
    796796(define-class <named> () (
    797   (namsym #:reader name) ) )
     797  (namsym reader: name) ) )
    798798
    799799;; Parameterized extension "concept"
     
    872872(use coops-extras)
    873873
    874 (define expn-rd (make-random-distribution make-random-exponentials #:mu 0.5))
     874(define expn-rd (make-random-distribution make-random-exponentials mu: 0.5))
    875875(describe-object expn-rd)
    876876;coops instance of class `<random-distribution>':
    877 ;tmpval : #f
    878 ;namsym : exponentials
    879 ;params : (0.5)
    880 ;   src : #<procedure (f_1415)>
    881 ;nxtval : #<procedure (f_1037)>
     877;tmpval: #f
     878;namsym: exponentials
     879;  ctor: #<procedure (srfi-27-distributions#make-random-exponentials . tmp302303)>
     880;params: (0.5)
     881;   src: #<procedure>
     882;nxtval: #<procedure (f_1191)>
    882883
    883884(next-value expn-rd) ;=> ...
Note: See TracChangeset for help on using the changeset viewer.