@fgv/ts-random 5.1.0-19 → 5.1.0-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/.rush/temp/chunked-rush-logs/ts-random.build.chunks.jsonl +0 -6
- package/.rush/temp/fba88d771243a88edd09f745ba7194831032f604.tar.log +0 -121
- package/.rush/temp/operation/build/all.log +0 -6
- package/.rush/temp/operation/build/log-chunks.jsonl +0 -6
- package/.rush/temp/operation/build/state.json +0 -3
- package/.rush/temp/shrinkwrap-deps.json +0 -614
- package/config/jest.config.json +0 -13
- package/config/rig.json +0 -4
- package/config/typedoc.json +0 -7
- package/dist/test/unit/generators.test.js +0 -596
- package/dist/test/unit/generators.test.js.map +0 -1
- package/dist/test/unit/randomSource.test.js +0 -452
- package/dist/test/unit/randomSource.test.js.map +0 -1
- package/docs/Chars/README.md +0 -152
- package/docs/Chars/variables/all.md +0 -9
- package/docs/Chars/variables/alphanumeric.md +0 -9
- package/docs/Chars/variables/base64.md +0 -9
- package/docs/Chars/variables/base64Url.md +0 -9
- package/docs/Chars/variables/base64UrlNoPadding.md +0 -9
- package/docs/Chars/variables/digits.md +0 -9
- package/docs/Chars/variables/hex.md +0 -9
- package/docs/Chars/variables/hexDigits.md +0 -9
- package/docs/Chars/variables/hexDigitsUpper.md +0 -9
- package/docs/Chars/variables/letters.md +0 -9
- package/docs/Chars/variables/lowerCase.md +0 -9
- package/docs/Chars/variables/printable.md +0 -9
- package/docs/Chars/variables/symbols.md +0 -9
- package/docs/Chars/variables/upperCase.md +0 -9
- package/docs/Chars/variables/whitespace.md +0 -9
- package/docs/Generator/README.md +0 -144
- package/docs/Generator/classes/PseudoRandomGenerator.clone.md +0 -17
- package/docs/Generator/classes/PseudoRandomGenerator.create.md +0 -24
- package/docs/Generator/classes/PseudoRandomGenerator.createChild.md +0 -24
- package/docs/Generator/classes/PseudoRandomGenerator.ensureRng.md +0 -25
- package/docs/Generator/classes/PseudoRandomGenerator.getGlobalRng.md +0 -17
- package/docs/Generator/classes/PseudoRandomGenerator.md +0 -258
- package/docs/Generator/classes/PseudoRandomGenerator.nextBoolean.md +0 -24
- package/docs/Generator/classes/PseudoRandomGenerator.nextFloat.md +0 -17
- package/docs/Generator/classes/PseudoRandomGenerator.nextInRange.md +0 -25
- package/docs/Generator/classes/PseudoRandomGenerator.nextInt.md +0 -24
- package/docs/Generator/classes/PseudoRandomGenerator.nextString.md +0 -25
- package/docs/Generator/classes/PseudoRandomGenerator.pickNext.md +0 -24
- package/docs/Generator/classes/PseudoRandomGenerator.pickRandom.md +0 -25
- package/docs/Generator/classes/PseudoRandomGenerator.pickSequence.md +0 -24
- package/docs/Generator/classes/PseudoRandomGenerator.pickSequential.md +0 -25
- package/docs/Generator/classes/PseudoRandomGenerator.rng.md +0 -11
- package/docs/Generator/classes/PseudoRandomGenerator.setGlobalRng.md +0 -24
- package/docs/Generator/classes/SeededRandomSource.clone.md +0 -17
- package/docs/Generator/classes/SeededRandomSource.counter.md +0 -11
- package/docs/Generator/classes/SeededRandomSource.create.md +0 -24
- package/docs/Generator/classes/SeededRandomSource.createChild.md +0 -24
- package/docs/Generator/classes/SeededRandomSource.hashSeed.md +0 -24
- package/docs/Generator/classes/SeededRandomSource.hashStateAndLabel.md +0 -25
- package/docs/Generator/classes/SeededRandomSource.lineage.md +0 -9
- package/docs/Generator/classes/SeededRandomSource.md +0 -187
- package/docs/Generator/classes/SeededRandomSource.mulberryStep.md +0 -24
- package/docs/Generator/classes/SeededRandomSource.next.md +0 -17
- package/docs/Generator/classes/SeededRandomSource.seed.md +0 -9
- package/docs/Generator/interfaces/INextResult.md +0 -61
- package/docs/Generator/interfaces/INextResult.nextState.md +0 -9
- package/docs/Generator/interfaces/INextResult.value.md +0 -9
- package/docs/Generator/interfaces/IPseudoRandomGeneratorCreateParams.global.md +0 -9
- package/docs/Generator/interfaces/IPseudoRandomGeneratorCreateParams.md +0 -78
- package/docs/Generator/interfaces/IPseudoRandomGeneratorCreateParams.seed.md +0 -9
- package/docs/Generator/interfaces/IPseudoRandomGeneratorCreateParams.step.md +0 -9
- package/docs/Generator/interfaces/IRandomSequencePickParams.candidates.md +0 -9
- package/docs/Generator/interfaces/IRandomSequencePickParams.count.md +0 -9
- package/docs/Generator/interfaces/IRandomSequencePickParams.how.md +0 -9
- package/docs/Generator/interfaces/IRandomSequencePickParams.md +0 -79
- package/docs/Generator/interfaces/ISeedPair.md +0 -61
- package/docs/Generator/interfaces/ISeedPair.seed.md +0 -9
- package/docs/Generator/interfaces/ISeedPair.state.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceConstructorParams.counter.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceConstructorParams.lineage.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceConstructorParams.md +0 -112
- package/docs/Generator/interfaces/ISeededRandomSourceConstructorParams.seed.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceConstructorParams.state.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceConstructorParams.step.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceCreateParams.md +0 -61
- package/docs/Generator/interfaces/ISeededRandomSourceCreateParams.seed.md +0 -9
- package/docs/Generator/interfaces/ISeededRandomSourceCreateParams.step.md +0 -9
- package/docs/Generator/interfaces/ISequentialPickParams.candidates.md +0 -9
- package/docs/Generator/interfaces/ISequentialPickParams.count.md +0 -9
- package/docs/Generator/interfaces/ISequentialPickParams.how.md +0 -9
- package/docs/Generator/interfaces/ISequentialPickParams.md +0 -79
- package/docs/Generator/type-aliases/RandomStepFunction.md +0 -11
- package/docs/Generator/type-aliases/SequencePickParams.md +0 -11
- package/docs/GeneratorData/Chars/README.md +0 -152
- package/docs/GeneratorData/Chars/variables/all.md +0 -9
- package/docs/GeneratorData/Chars/variables/alphanumeric.md +0 -9
- package/docs/GeneratorData/Chars/variables/base64.md +0 -9
- package/docs/GeneratorData/Chars/variables/base64Url.md +0 -9
- package/docs/GeneratorData/Chars/variables/base64UrlNoPadding.md +0 -9
- package/docs/GeneratorData/Chars/variables/digits.md +0 -9
- package/docs/GeneratorData/Chars/variables/hex.md +0 -9
- package/docs/GeneratorData/Chars/variables/hexDigits.md +0 -9
- package/docs/GeneratorData/Chars/variables/hexDigitsUpper.md +0 -9
- package/docs/GeneratorData/Chars/variables/letters.md +0 -9
- package/docs/GeneratorData/Chars/variables/lowerCase.md +0 -9
- package/docs/GeneratorData/Chars/variables/printable.md +0 -9
- package/docs/GeneratorData/Chars/variables/symbols.md +0 -9
- package/docs/GeneratorData/Chars/variables/upperCase.md +0 -9
- package/docs/GeneratorData/Chars/variables/whitespace.md +0 -9
- package/docs/GeneratorData/README.md +0 -35
- package/docs/GeneratorData/Words/README.md +0 -125
- package/docs/GeneratorData/Words/variables/Adjectives.md +0 -7
- package/docs/GeneratorData/Words/variables/Animals.md +0 -7
- package/docs/GeneratorData/Words/variables/Cities.md +0 -7
- package/docs/GeneratorData/Words/variables/Colors.md +0 -7
- package/docs/GeneratorData/Words/variables/Countries.md +0 -7
- package/docs/GeneratorData/Words/variables/Domains.md +0 -7
- package/docs/GeneratorData/Words/variables/FamilyNames.md +0 -9
- package/docs/GeneratorData/Words/variables/FirstNames.md +0 -9
- package/docs/GeneratorData/Words/variables/FirstNamesFemale.md +0 -9
- package/docs/GeneratorData/Words/variables/FirstNamesMale.md +0 -9
- package/docs/GeneratorData/Words/variables/Gerunds.md +0 -7
- package/docs/GeneratorData/Words/variables/jobs.md +0 -7
- package/docs/GeneratorData/variables/Adjectives.md +0 -7
- package/docs/GeneratorData/variables/Animals.md +0 -7
- package/docs/GeneratorData/variables/Cities.md +0 -7
- package/docs/GeneratorData/variables/Colors.md +0 -7
- package/docs/GeneratorData/variables/Countries.md +0 -7
- package/docs/GeneratorData/variables/Domains.md +0 -7
- package/docs/GeneratorData/variables/FamilyNames.md +0 -9
- package/docs/GeneratorData/variables/FirstNames.md +0 -9
- package/docs/GeneratorData/variables/FirstNamesFemale.md +0 -9
- package/docs/GeneratorData/variables/FirstNamesMale.md +0 -9
- package/docs/GeneratorData/variables/Gerunds.md +0 -7
- package/docs/GeneratorData/variables/all.md +0 -9
- package/docs/GeneratorData/variables/alphanumeric.md +0 -9
- package/docs/GeneratorData/variables/base64.md +0 -9
- package/docs/GeneratorData/variables/base64Url.md +0 -9
- package/docs/GeneratorData/variables/base64UrlNoPadding.md +0 -9
- package/docs/GeneratorData/variables/digits.md +0 -9
- package/docs/GeneratorData/variables/hex.md +0 -9
- package/docs/GeneratorData/variables/hexDigits.md +0 -9
- package/docs/GeneratorData/variables/hexDigitsUpper.md +0 -9
- package/docs/GeneratorData/variables/jobs.md +0 -7
- package/docs/GeneratorData/variables/letters.md +0 -9
- package/docs/GeneratorData/variables/lowerCase.md +0 -9
- package/docs/GeneratorData/variables/printable.md +0 -9
- package/docs/GeneratorData/variables/symbols.md +0 -9
- package/docs/GeneratorData/variables/upperCase.md +0 -9
- package/docs/GeneratorData/variables/whitespace.md +0 -9
- package/docs/README.md +0 -35
- package/docs/Words/README.md +0 -125
- package/docs/Words/variables/Adjectives.md +0 -7
- package/docs/Words/variables/Animals.md +0 -7
- package/docs/Words/variables/Cities.md +0 -7
- package/docs/Words/variables/Colors.md +0 -7
- package/docs/Words/variables/Countries.md +0 -7
- package/docs/Words/variables/Domains.md +0 -7
- package/docs/Words/variables/FamilyNames.md +0 -9
- package/docs/Words/variables/FirstNames.md +0 -9
- package/docs/Words/variables/FirstNamesFemale.md +0 -9
- package/docs/Words/variables/FirstNamesMale.md +0 -9
- package/docs/Words/variables/Gerunds.md +0 -7
- package/docs/Words/variables/jobs.md +0 -7
- package/docs/classes/PseudoRandomGenerator.clone.md +0 -17
- package/docs/classes/PseudoRandomGenerator.create.md +0 -24
- package/docs/classes/PseudoRandomGenerator.createChild.md +0 -24
- package/docs/classes/PseudoRandomGenerator.ensureRng.md +0 -25
- package/docs/classes/PseudoRandomGenerator.getGlobalRng.md +0 -17
- package/docs/classes/PseudoRandomGenerator.md +0 -258
- package/docs/classes/PseudoRandomGenerator.nextBoolean.md +0 -24
- package/docs/classes/PseudoRandomGenerator.nextFloat.md +0 -17
- package/docs/classes/PseudoRandomGenerator.nextInRange.md +0 -25
- package/docs/classes/PseudoRandomGenerator.nextInt.md +0 -24
- package/docs/classes/PseudoRandomGenerator.nextString.md +0 -25
- package/docs/classes/PseudoRandomGenerator.pickNext.md +0 -24
- package/docs/classes/PseudoRandomGenerator.pickRandom.md +0 -25
- package/docs/classes/PseudoRandomGenerator.pickSequence.md +0 -24
- package/docs/classes/PseudoRandomGenerator.pickSequential.md +0 -25
- package/docs/classes/PseudoRandomGenerator.rng.md +0 -11
- package/docs/classes/PseudoRandomGenerator.setGlobalRng.md +0 -24
- package/docs/classes/SeededRandomSource.clone.md +0 -17
- package/docs/classes/SeededRandomSource.counter.md +0 -11
- package/docs/classes/SeededRandomSource.create.md +0 -24
- package/docs/classes/SeededRandomSource.createChild.md +0 -24
- package/docs/classes/SeededRandomSource.hashSeed.md +0 -24
- package/docs/classes/SeededRandomSource.hashStateAndLabel.md +0 -25
- package/docs/classes/SeededRandomSource.lineage.md +0 -9
- package/docs/classes/SeededRandomSource.md +0 -187
- package/docs/classes/SeededRandomSource.mulberryStep.md +0 -24
- package/docs/classes/SeededRandomSource.next.md +0 -17
- package/docs/classes/SeededRandomSource.seed.md +0 -9
- package/docs/interfaces/INextResult.md +0 -61
- package/docs/interfaces/INextResult.nextState.md +0 -9
- package/docs/interfaces/INextResult.value.md +0 -9
- package/docs/interfaces/IPseudoRandomGeneratorCreateParams.global.md +0 -9
- package/docs/interfaces/IPseudoRandomGeneratorCreateParams.md +0 -78
- package/docs/interfaces/IPseudoRandomGeneratorCreateParams.seed.md +0 -9
- package/docs/interfaces/IPseudoRandomGeneratorCreateParams.step.md +0 -9
- package/docs/interfaces/IRandomSequencePickParams.candidates.md +0 -9
- package/docs/interfaces/IRandomSequencePickParams.count.md +0 -9
- package/docs/interfaces/IRandomSequencePickParams.how.md +0 -9
- package/docs/interfaces/IRandomSequencePickParams.md +0 -79
- package/docs/interfaces/ISeedPair.md +0 -61
- package/docs/interfaces/ISeedPair.seed.md +0 -9
- package/docs/interfaces/ISeedPair.state.md +0 -9
- package/docs/interfaces/ISeededRandomSourceConstructorParams.counter.md +0 -9
- package/docs/interfaces/ISeededRandomSourceConstructorParams.lineage.md +0 -9
- package/docs/interfaces/ISeededRandomSourceConstructorParams.md +0 -112
- package/docs/interfaces/ISeededRandomSourceConstructorParams.seed.md +0 -9
- package/docs/interfaces/ISeededRandomSourceConstructorParams.state.md +0 -9
- package/docs/interfaces/ISeededRandomSourceConstructorParams.step.md +0 -9
- package/docs/interfaces/ISeededRandomSourceCreateParams.md +0 -61
- package/docs/interfaces/ISeededRandomSourceCreateParams.seed.md +0 -9
- package/docs/interfaces/ISeededRandomSourceCreateParams.step.md +0 -9
- package/docs/interfaces/ISequentialPickParams.candidates.md +0 -9
- package/docs/interfaces/ISequentialPickParams.count.md +0 -9
- package/docs/interfaces/ISequentialPickParams.how.md +0 -9
- package/docs/interfaces/ISequentialPickParams.md +0 -79
- package/docs/type-aliases/RandomStepFunction.md +0 -11
- package/docs/type-aliases/SequencePickParams.md +0 -11
- package/docs/variables/Adjectives.md +0 -7
- package/docs/variables/Animals.md +0 -7
- package/docs/variables/Cities.md +0 -7
- package/docs/variables/Colors.md +0 -7
- package/docs/variables/Countries.md +0 -7
- package/docs/variables/Domains.md +0 -7
- package/docs/variables/FamilyNames.md +0 -9
- package/docs/variables/FirstNames.md +0 -9
- package/docs/variables/FirstNamesFemale.md +0 -9
- package/docs/variables/FirstNamesMale.md +0 -9
- package/docs/variables/Gerunds.md +0 -7
- package/docs/variables/all.md +0 -9
- package/docs/variables/alphanumeric.md +0 -9
- package/docs/variables/base64.md +0 -9
- package/docs/variables/base64Url.md +0 -9
- package/docs/variables/base64UrlNoPadding.md +0 -9
- package/docs/variables/digits.md +0 -9
- package/docs/variables/hex.md +0 -9
- package/docs/variables/hexDigits.md +0 -9
- package/docs/variables/hexDigitsUpper.md +0 -9
- package/docs/variables/jobs.md +0 -7
- package/docs/variables/letters.md +0 -9
- package/docs/variables/lowerCase.md +0 -9
- package/docs/variables/printable.md +0 -9
- package/docs/variables/symbols.md +0 -9
- package/docs/variables/upperCase.md +0 -9
- package/docs/variables/whitespace.md +0 -9
- package/lib/test/unit/generators.test.d.ts +0 -2
- package/lib/test/unit/generators.test.d.ts.map +0 -1
- package/lib/test/unit/generators.test.js +0 -598
- package/lib/test/unit/generators.test.js.map +0 -1
- package/lib/test/unit/randomSource.test.d.ts +0 -2
- package/lib/test/unit/randomSource.test.d.ts.map +0 -1
- package/lib/test/unit/randomSource.test.js +0 -454
- package/lib/test/unit/randomSource.test.js.map +0 -1
- package/rush-logs/ts-random.build.cache.log +0 -3
- package/rush-logs/ts-random.build.log +0 -6
- package/src/generator/generators.ts +0 -273
- package/src/generator/index.ts +0 -22
- package/src/generator/randomSource.ts +0 -224
- package/src/generator-data/charClasses.ts +0 -95
- package/src/generator-data/index.ts +0 -22
- package/src/generator-data/words/adjectives.ts +0 -247
- package/src/generator-data/words/animals.ts +0 -75
- package/src/generator-data/words/cities.ts +0 -229
- package/src/generator-data/words/colors.ts +0 -56
- package/src/generator-data/words/countries.ts +0 -217
- package/src/generator-data/words/domains.ts +0 -47
- package/src/generator-data/words/gerunds.ts +0 -126
- package/src/generator-data/words/index.ts +0 -29
- package/src/generator-data/words/jobs.ts +0 -175
- package/src/generator-data/words/names.ts +0 -717
- package/src/index.ts +0 -7
- package/src/test/unit/generators.test.ts +0 -697
- package/src/test/unit/randomSource.test.ts +0 -526
- package/temp/build/typescript/ts_8nwakTlr.json +0 -1
- package/tsconfig.json +0 -7
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > PseudoRandomGenerator
|
|
2
|
-
|
|
3
|
-
# Class: PseudoRandomGenerator
|
|
4
|
-
|
|
5
|
-
A pseudo-random number generator that can be used to generate random values
|
|
6
|
-
of various shapes.
|
|
7
|
-
|
|
8
|
-
## Properties
|
|
9
|
-
|
|
10
|
-
<table><thead><tr><th>
|
|
11
|
-
|
|
12
|
-
Property
|
|
13
|
-
|
|
14
|
-
</th><th>
|
|
15
|
-
|
|
16
|
-
Modifiers
|
|
17
|
-
|
|
18
|
-
</th><th>
|
|
19
|
-
|
|
20
|
-
Type
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Description
|
|
25
|
-
|
|
26
|
-
</th></tr></thead>
|
|
27
|
-
<tbody>
|
|
28
|
-
<tr><td>
|
|
29
|
-
|
|
30
|
-
[rng](./PseudoRandomGenerator.rng.md)
|
|
31
|
-
|
|
32
|
-
</td><td>
|
|
33
|
-
|
|
34
|
-
`readonly`
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
[SeededRandomSource](../../classes/SeededRandomSource.md)
|
|
39
|
-
|
|
40
|
-
</td><td>
|
|
41
|
-
|
|
42
|
-
The underlying random number generator.
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
</tbody></table>
|
|
46
|
-
|
|
47
|
-
## Methods
|
|
48
|
-
|
|
49
|
-
<table><thead><tr><th>
|
|
50
|
-
|
|
51
|
-
Method
|
|
52
|
-
|
|
53
|
-
</th><th>
|
|
54
|
-
|
|
55
|
-
Modifiers
|
|
56
|
-
|
|
57
|
-
</th><th>
|
|
58
|
-
|
|
59
|
-
Description
|
|
60
|
-
|
|
61
|
-
</th></tr></thead>
|
|
62
|
-
<tbody>
|
|
63
|
-
<tr><td>
|
|
64
|
-
|
|
65
|
-
[create(params)](./PseudoRandomGenerator.create.md)
|
|
66
|
-
|
|
67
|
-
</td><td>
|
|
68
|
-
|
|
69
|
-
`static`
|
|
70
|
-
|
|
71
|
-
</td><td>
|
|
72
|
-
|
|
73
|
-
Creates a new pseudo-random number generator.
|
|
74
|
-
|
|
75
|
-
</td></tr>
|
|
76
|
-
<tr><td>
|
|
77
|
-
|
|
78
|
-
[setGlobalRng(rng)](./PseudoRandomGenerator.setGlobalRng.md)
|
|
79
|
-
|
|
80
|
-
</td><td>
|
|
81
|
-
|
|
82
|
-
`static`
|
|
83
|
-
|
|
84
|
-
</td><td>
|
|
85
|
-
|
|
86
|
-
Sets this generator as the global random number generator.
|
|
87
|
-
|
|
88
|
-
</td></tr>
|
|
89
|
-
<tr><td>
|
|
90
|
-
|
|
91
|
-
[getGlobalRng()](./PseudoRandomGenerator.getGlobalRng.md)
|
|
92
|
-
|
|
93
|
-
</td><td>
|
|
94
|
-
|
|
95
|
-
`static`
|
|
96
|
-
|
|
97
|
-
</td><td>
|
|
98
|
-
|
|
99
|
-
Gets the global random number generator.
|
|
100
|
-
|
|
101
|
-
</td></tr>
|
|
102
|
-
<tr><td>
|
|
103
|
-
|
|
104
|
-
[ensureRng(rng)](./PseudoRandomGenerator.ensureRng.md)
|
|
105
|
-
|
|
106
|
-
</td><td>
|
|
107
|
-
|
|
108
|
-
`static`
|
|
109
|
-
|
|
110
|
-
</td><td>
|
|
111
|
-
|
|
112
|
-
Ensures a random number generator is available, using the global generator if available
|
|
113
|
-
|
|
114
|
-
</td></tr>
|
|
115
|
-
<tr><td>
|
|
116
|
-
|
|
117
|
-
[clone()](./PseudoRandomGenerator.clone.md)
|
|
118
|
-
|
|
119
|
-
</td><td>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
</td><td>
|
|
124
|
-
|
|
125
|
-
Creates a clone of this generator.
|
|
126
|
-
|
|
127
|
-
</td></tr>
|
|
128
|
-
<tr><td>
|
|
129
|
-
|
|
130
|
-
[createChild(label)](./PseudoRandomGenerator.createChild.md)
|
|
131
|
-
|
|
132
|
-
</td><td>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
</td><td>
|
|
137
|
-
|
|
138
|
-
Creates a child generator with the given label.
|
|
139
|
-
|
|
140
|
-
</td></tr>
|
|
141
|
-
<tr><td>
|
|
142
|
-
|
|
143
|
-
[nextFloat()](./PseudoRandomGenerator.nextFloat.md)
|
|
144
|
-
|
|
145
|
-
</td><td>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
</td><td>
|
|
150
|
-
|
|
151
|
-
Generates a random float between 0 and 1.
|
|
152
|
-
|
|
153
|
-
</td></tr>
|
|
154
|
-
<tr><td>
|
|
155
|
-
|
|
156
|
-
[nextInt(extent)](./PseudoRandomGenerator.nextInt.md)
|
|
157
|
-
|
|
158
|
-
</td><td>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
</td><td>
|
|
163
|
-
|
|
164
|
-
Generates a random integer between 0 and the specified extent (positive or negative).
|
|
165
|
-
|
|
166
|
-
</td></tr>
|
|
167
|
-
<tr><td>
|
|
168
|
-
|
|
169
|
-
[nextInRange(min, max)](./PseudoRandomGenerator.nextInRange.md)
|
|
170
|
-
|
|
171
|
-
</td><td>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
</td><td>
|
|
176
|
-
|
|
177
|
-
Generates a random integer between the specified minimum and maximum values.
|
|
178
|
-
|
|
179
|
-
</td></tr>
|
|
180
|
-
<tr><td>
|
|
181
|
-
|
|
182
|
-
[nextBoolean(trueProbability)](./PseudoRandomGenerator.nextBoolean.md)
|
|
183
|
-
|
|
184
|
-
</td><td>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
</td><td>
|
|
189
|
-
|
|
190
|
-
Generates a random boolean value.
|
|
191
|
-
|
|
192
|
-
</td></tr>
|
|
193
|
-
<tr><td>
|
|
194
|
-
|
|
195
|
-
[nextString(length, chars)](./PseudoRandomGenerator.nextString.md)
|
|
196
|
-
|
|
197
|
-
</td><td>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
</td><td>
|
|
202
|
-
|
|
203
|
-
Generates a random string of the specified length using the given characters.
|
|
204
|
-
|
|
205
|
-
</td></tr>
|
|
206
|
-
<tr><td>
|
|
207
|
-
|
|
208
|
-
[pickNext(items)](./PseudoRandomGenerator.pickNext.md)
|
|
209
|
-
|
|
210
|
-
</td><td>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
</td><td>
|
|
215
|
-
|
|
216
|
-
Generates a random item from the given array.
|
|
217
|
-
|
|
218
|
-
</td></tr>
|
|
219
|
-
<tr><td>
|
|
220
|
-
|
|
221
|
-
[pickSequential(params)](./PseudoRandomGenerator.pickSequential.md)
|
|
222
|
-
|
|
223
|
-
</td><td>
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
</td><td>
|
|
228
|
-
|
|
229
|
-
Generates a sequence of values by randomly selecting from the given candidate
|
|
230
|
-
|
|
231
|
-
</td></tr>
|
|
232
|
-
<tr><td>
|
|
233
|
-
|
|
234
|
-
[pickRandom(params)](./PseudoRandomGenerator.pickRandom.md)
|
|
235
|
-
|
|
236
|
-
</td><td>
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</td><td>
|
|
241
|
-
|
|
242
|
-
Generates a sequence of values by randomly selecting from the supplied
|
|
243
|
-
|
|
244
|
-
</td></tr>
|
|
245
|
-
<tr><td>
|
|
246
|
-
|
|
247
|
-
[pickSequence(params)](./PseudoRandomGenerator.pickSequence.md)
|
|
248
|
-
|
|
249
|
-
</td><td>
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
</td><td>
|
|
254
|
-
|
|
255
|
-
Generates a sequence of values by randomly selecting from the given candidates.
|
|
256
|
-
|
|
257
|
-
</td></tr>
|
|
258
|
-
</tbody></table>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > nextBoolean
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.nextBoolean() method
|
|
4
|
-
|
|
5
|
-
Generates a random boolean value.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
nextBoolean(trueProbability: number): boolean;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>trueProbability</td><td>number</td><td>The probability of returning true (default is 0.5).</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
boolean
|
|
23
|
-
|
|
24
|
-
A random boolean value.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > nextFloat
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.nextFloat() method
|
|
4
|
-
|
|
5
|
-
Generates a random float between 0 and 1.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
nextFloat(): number;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Returns:**
|
|
14
|
-
|
|
15
|
-
number
|
|
16
|
-
|
|
17
|
-
A random float between 0 and 1.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > nextInRange
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.nextInRange() method
|
|
4
|
-
|
|
5
|
-
Generates a random integer between the specified minimum and maximum values.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
nextInRange(min: number | undefined, max: number | undefined): number;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>min</td><td>number | undefined</td><td>The minimum value (inclusive).</td></tr>
|
|
18
|
-
<tr><td>max</td><td>number | undefined</td><td>The maximum value (inclusive).</td></tr>
|
|
19
|
-
</tbody></table>
|
|
20
|
-
|
|
21
|
-
**Returns:**
|
|
22
|
-
|
|
23
|
-
number
|
|
24
|
-
|
|
25
|
-
A random integer between the specified minimum and maximum values.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > nextInt
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.nextInt() method
|
|
4
|
-
|
|
5
|
-
Generates a random integer between 0 and the specified extent (positive or negative).
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
nextInt(extent?: number): number;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>extent</td><td>number</td><td>The maximum (or minimum) value (exclusive).</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
number
|
|
23
|
-
|
|
24
|
-
A random integer between 0 and the specified extent.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > nextString
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.nextString() method
|
|
4
|
-
|
|
5
|
-
Generates a random string of the specified length using the given characters.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
nextString(length: number, chars: string): string;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>length</td><td>number</td><td>The length of the string to generate.</td></tr>
|
|
18
|
-
<tr><td>chars</td><td>string</td><td>The characters to use for the string (default is alphanumeric).</td></tr>
|
|
19
|
-
</tbody></table>
|
|
20
|
-
|
|
21
|
-
**Returns:**
|
|
22
|
-
|
|
23
|
-
string
|
|
24
|
-
|
|
25
|
-
A random string of the specified length.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > pickNext
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.pickNext() method
|
|
4
|
-
|
|
5
|
-
Generates a random item from the given array.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
pickNext(items?: readonly T[]): T | undefined;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>items</td><td>readonly T[]</td><td>The array to select from.</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
T | undefined
|
|
23
|
-
|
|
24
|
-
A random item from the array or undefined if the array is empty.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > pickRandom
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.pickRandom() method
|
|
4
|
-
|
|
5
|
-
Generates a sequence of values by randomly selecting from the supplied
|
|
6
|
-
dictionaries in random order.
|
|
7
|
-
|
|
8
|
-
**Signature:**
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
pickRandom(params: IRandomSequencePickParams<T>): readonly T[];
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**Parameters:**
|
|
15
|
-
|
|
16
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
17
|
-
<tbody>
|
|
18
|
-
<tr><td>params</td><td>IRandomSequencePickParams<T></td><td>The parameters for generating the sequence.</td></tr>
|
|
19
|
-
</tbody></table>
|
|
20
|
-
|
|
21
|
-
**Returns:**
|
|
22
|
-
|
|
23
|
-
readonly T[]
|
|
24
|
-
|
|
25
|
-
A sequence of values.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > pickSequence
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.pickSequence() method
|
|
4
|
-
|
|
5
|
-
Generates a sequence of values by randomly selecting from the given candidates.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
pickSequence(params: SequencePickParams<T>): readonly T[];
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>params</td><td>SequencePickParams<T></td><td>The parameters for generating the sequence.</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
readonly T[]
|
|
23
|
-
|
|
24
|
-
A sequence of values.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > pickSequential
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.pickSequential() method
|
|
4
|
-
|
|
5
|
-
Generates a sequence of values by randomly selecting from the given candidate
|
|
6
|
-
dictionaries in order.
|
|
7
|
-
|
|
8
|
-
**Signature:**
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
pickSequential(params: ISequentialPickParams<T>): readonly T[];
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**Parameters:**
|
|
15
|
-
|
|
16
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
17
|
-
<tbody>
|
|
18
|
-
<tr><td>params</td><td>ISequentialPickParams<T></td><td>The parameters for generating the sequence.</td></tr>
|
|
19
|
-
</tbody></table>
|
|
20
|
-
|
|
21
|
-
**Returns:**
|
|
22
|
-
|
|
23
|
-
readonly T[]
|
|
24
|
-
|
|
25
|
-
A sequence of values.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > rng
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.rng property
|
|
4
|
-
|
|
5
|
-
The underlying random number generator.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
readonly rng: SeededRandomSource;
|
|
11
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [PseudoRandomGenerator](./PseudoRandomGenerator.md) > setGlobalRng
|
|
2
|
-
|
|
3
|
-
## PseudoRandomGenerator.setGlobalRng() method
|
|
4
|
-
|
|
5
|
-
Sets this generator as the global random number generator.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
static setGlobalRng(rng?: PseudoRandomGenerator): PseudoRandomGenerator | undefined;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>rng</td><td>PseudoRandomGenerator</td><td></td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
[PseudoRandomGenerator](../../classes/PseudoRandomGenerator.md) | undefined
|
|
23
|
-
|
|
24
|
-
A result containing this generator or an error.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [SeededRandomSource](./SeededRandomSource.md) > clone
|
|
2
|
-
|
|
3
|
-
## SeededRandomSource.clone() method
|
|
4
|
-
|
|
5
|
-
Creates a clone of this random source.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
clone(): SeededRandomSource;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Returns:**
|
|
14
|
-
|
|
15
|
-
[SeededRandomSource](../../classes/SeededRandomSource.md)
|
|
16
|
-
|
|
17
|
-
A new seeded random source with the same state.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [SeededRandomSource](./SeededRandomSource.md) > counter
|
|
2
|
-
|
|
3
|
-
## SeededRandomSource.counter property
|
|
4
|
-
|
|
5
|
-
Gets the current counter value.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
readonly counter: number;
|
|
11
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [SeededRandomSource](./SeededRandomSource.md) > create
|
|
2
|
-
|
|
3
|
-
## SeededRandomSource.create() method
|
|
4
|
-
|
|
5
|
-
Creates a new seeded random source from an optional seed.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
static create(seed?: string | number): Result<SeededRandomSource>;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>seed</td><td>string | number</td><td>The optional seed value.</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
Result<[SeededRandomSource](../../classes/SeededRandomSource.md)>
|
|
23
|
-
|
|
24
|
-
A new seeded random source.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [SeededRandomSource](./SeededRandomSource.md) > createChild
|
|
2
|
-
|
|
3
|
-
## SeededRandomSource.createChild() method
|
|
4
|
-
|
|
5
|
-
Creates a child random source with a label.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
createChild(label: string): SeededRandomSource;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>label</td><td>string</td><td>The label for the child.</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
[SeededRandomSource](../../classes/SeededRandomSource.md)
|
|
23
|
-
|
|
24
|
-
A new seeded random source with a hashed state and label.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [SeededRandomSource](./SeededRandomSource.md) > hashSeed
|
|
2
|
-
|
|
3
|
-
## SeededRandomSource.hashSeed() method
|
|
4
|
-
|
|
5
|
-
Hashes a seed value.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
static hashSeed(seed: string | number): ISeedPair;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>seed</td><td>string | number</td><td>The seed value.</td></tr>
|
|
18
|
-
</tbody></table>
|
|
19
|
-
|
|
20
|
-
**Returns:**
|
|
21
|
-
|
|
22
|
-
[ISeedPair](../../interfaces/ISeedPair.md)
|
|
23
|
-
|
|
24
|
-
A hashed seed value.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > [SeededRandomSource](./SeededRandomSource.md) > hashStateAndLabel
|
|
2
|
-
|
|
3
|
-
## SeededRandomSource.hashStateAndLabel() method
|
|
4
|
-
|
|
5
|
-
Hashes a state and label.
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
static hashStateAndLabel(state: number, label: string): ISeedPair;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**Parameters:**
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<tr><td>state</td><td>number</td><td>The state value.</td></tr>
|
|
18
|
-
<tr><td>label</td><td>string</td><td>The label value.</td></tr>
|
|
19
|
-
</tbody></table>
|
|
20
|
-
|
|
21
|
-
**Returns:**
|
|
22
|
-
|
|
23
|
-
[ISeedPair](../../interfaces/ISeedPair.md)
|
|
24
|
-
|
|
25
|
-
A hashed state and label value.
|