Skip to content

Commit f9745b7

Browse files
committed
#50-Fix erroneous documentation
Completed. Validated.
1 parent 071847b commit f9745b7

13 files changed

Lines changed: 64 additions & 70 deletions

PyRandLib/fastrand32.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,13 @@ class FastRand32( BaseLCG ):
5959
6060
Furthermore this class is callable:
6161
rand = FastRand32()
62-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
63-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
64-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
62+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
63+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
64+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
6565
6666
Notice that for simulating the roll of a dice you should program:
6767
diceRoll = FastRand32()
68-
print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
69-
70-
Such a programming is an accelerated while still robust emulation of the
71-
inherited methods:
72-
- random.Random.randint(self,1,6) and
73-
- random.Random.randrange(self,1,7,1)
68+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
7469
7570
Reminder:
7671
We give you here below a copy of the table of tests for the LCGs that have

PyRandLib/fastrand63.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ class FastRand63( BaseLCG ):
5959
6060
Furthermore this class is callable:
6161
rand = FastRand63()
62-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
63-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
64-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
62+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
63+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
64+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
6565
6666
Notice that for simulating the roll of a dice you should program:
6767
diceRoll = FastRand63()
68-
print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
68+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
6969
7070
Such a programming is an accelerated while still robust emulation of the
7171
inherited methods:

PyRandLib/lfib116.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,13 @@ class LFib116( BaseLFib64 ):
7373
Example:
7474
7575
rand = LFib116()
76-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
77-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
78-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
76+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
77+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
78+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
7979
8080
Notice that for simulating the roll of a dice you should program:
81-
8281
diceRoll = LFib116()
83-
print(int(diceRoll(1, 7))) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
82+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
8483
8584
Such a programming is an accelerated while still robust emulation of the
8685
inherited methods:

PyRandLib/lfib1340.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,13 @@ class LFib1340( BaseLFib64 ):
7474
Example:
7575
7676
rand = LFib1340()
77-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
78-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
79-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
77+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
78+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
79+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
8080
8181
Notice that for simulating the roll of a dice you should program:
82-
8382
diceRoll = LFib1340()
84-
print(int(diceRoll(1, 7))) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
83+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
8584
8685
Such a programming is an accelerated while still robust emulation of the
8786
inherited methods:

PyRandLib/lfib668.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,13 @@ class LFib668( BaseLFib64 ):
7373
Example:
7474
7575
rand = LFib668()
76-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
77-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
78-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
76+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
77+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
78+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
7979
8080
Notice that for simulating the roll of a dice you should program:
81-
8281
diceRoll = LFib668()
83-
print(int(diceRoll(1, 7))) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
82+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
8483
8584
Such a programming is an accelerated while still robust emulation of the
8685
inherited methods:

PyRandLib/lfib78.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ class LFib78( BaseLFib64 ):
7272
Example:
7373
7474
rand = LFib78()
75-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
76-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
77-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
75+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
76+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
77+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
7878
7979
Notice that for simulating the roll of a dice you should program:
80-
8180
diceRoll = LFib78()
82-
print(int(diceRoll(1, 7))) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
81+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
8382
8483
Such a programming is an accelerated while still robust emulation of the
8584
inherited methods:

PyRandLib/mrgrand1457.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ class MRGRand1457( BaseMRG ):
6464
random(), seed(), getstate(), and setstate().
6565
6666
Furthermore this class is callable:
67-
rand = MRGRand1457()
68-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
69-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
70-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
67+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
68+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
69+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
7170
72-
Please notice that for simulating the roll of a dice you should program:
71+
Notice that for simulating the roll of a dice you should program:
7372
diceRoll = MRGRand1457()
74-
print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
73+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
74+
7575
7676
Such a programming is an accelerated while still robust emulation of the
7777
inherited methods:

PyRandLib/mrgrand287.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ class MRGRand287( BaseMRG ):
8080
8181
Furthermore, this class is callable:
8282
rand = MRGRand287()
83-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
84-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
85-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
83+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
84+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
85+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
8686
8787
Notice that for simulating the roll of a dice you should program:
8888
diceRoll = MRGRand287()
89-
print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
89+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
9090
9191
Such a programming is an accelerated while still robust emulation of the inherited
9292
methods:

PyRandLib/mrgrand49507.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ class MRGRand49507( BaseMRG ):
6565
6666
Furthermore this class is callable:
6767
rand = MRGRand49507()
68-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
69-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
70-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
68+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
69+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
70+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
7171
7272
Notice that for simulating the roll of a dice you should program:
7373
diceRoll = MRGRand49507()
74-
print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
74+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
75+
7576
7677
Such a programming is an accelerated while still robust emulation of the
7778
inherited methods:

PyRandLib/well1024a.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ class Well1024a( BaseWELL ):
6565
6666
Furthermore, this class is callable:
6767
rand = Well1024a()
68-
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
69-
print( rand(a) ) # prints a pseudo-random value within [0.0, a)
70-
print( rand(a,b) ) # prints a pseudo-random value within [a , b)
71-
68+
print( rand() ) # prints a pseudo-random value within [0.0, 1.0)
69+
print( rand(a) ) # prints a pseudo-random value within [0, a) or [0.0, a) depending on the type of a
70+
print( rand(a, n) ) # prints a list of n pseudo-random values each within [0, a)
71+
7272
Notice that for simulating the roll of a dice you should program:
7373
diceRoll = Well1024a()
74-
print( int(diceRoll(1, 7)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
74+
print( int(diceRoll.randint(1, 6)) ) # prints a uniform roll within set {1, 2, 3, 4, 5, 6}
75+
7576
7677
Such a programming is an accelerated while still robust emulation of the inherited
7778
methods:

0 commit comments

Comments
 (0)