RandomKISS2.st
changeset 4323 7caede8761de
parent 3418 7f8549e6ebfe
child 4594 041b61427188
equal deleted inserted replaced
4322:97661b0035ed 4323:7caede8761de
     1 "{ Package: 'stx:libbasic2' }"
     1 "{ Package: 'stx:libbasic2' }"
       
     2 
       
     3 "{ NameSpace: Smalltalk }"
     2 
     4 
     3 Object subclass:#RandomKISS2
     5 Object subclass:#RandomKISS2
     4 	instanceVariableNames:'x y z c'
     6 	instanceVariableNames:'x y z c'
     5 	classVariableNames:''
     7 	classVariableNames:''
     6 	poolDictionaries:''
     8 	poolDictionaries:''
    13 "
    15 "
    14     Warning: this generator should not be used for cryptographic work.
    16     Warning: this generator should not be used for cryptographic work.
    15 
    17 
    16     NO WARRANTY
    18     NO WARRANTY
    17 
    19 
    18     KISS combines a linear congruence, XorShift and Lag with carry geenrator.
    20     KISS combines a linear congruence, XorShift and Lag with carry generator.
    19     The idea is from George Marsaglia.
    21     The idea is from George Marsaglia.
    20     KISS2 uses slightly different parameters and initial state.
    22     KISS2 uses slightly different parameters and initial state.
    21 
    23 
    22     RandomKISS2 new nextInteger
    24     RandomKISS2 new nextInteger
    23     (RandomKISS2 new:5489) nextInteger
    25     (RandomKISS2 new:5489) nextInteger
   101 ! !
   103 ! !
   102 
   104 
   103 !RandomKISS2 class methodsFor:'documentation'!
   105 !RandomKISS2 class methodsFor:'documentation'!
   104 
   106 
   105 version
   107 version
   106     ^ '$Header: /cvs/stx/stx/libbasic2/RandomKISS2.st,v 1.6 2014-10-02 16:23:21 cg Exp $'
   108     ^ '$Header$'
   107 !
   109 !
   108 
   110 
   109 version_CVS
   111 version_CVS
   110     ^ '$Header: /cvs/stx/stx/libbasic2/RandomKISS2.st,v 1.6 2014-10-02 16:23:21 cg Exp $'
   112     ^ '$Header$'
   111 ! !
   113 ! !
   112 
   114