Random Num Gen¶
Functionality¶
Produces a list of pseudo-random numbers from a seed value.
Inputs & Parameters¶
Parameters |
Description |
---|---|
Int / Float |
Number type to be created |
Size |
Amount of numbers you want to create |
Seed |
Accepts float values, they are hashed into Integers internally. |
Int/Float Low |
Lower limit of values (included)* |
Int/Float High |
Higher limit of values (included)* |
Weights |
On “Int” mode. Can be supplied to create a non-uniform distribution |
Unique |
On “Int” mode. Outputs non-repeated numbers. The output size will be limited to (Int High - Int Low + 1) |
Distribution |
On “Float” mode many distribution functions can be selected.
|
Alpha |
Distribution parameter. Alpha > 0** |
Beta |
Secondary distribution parameter. Beta > 0** |
t |
Normalized distribution parameter. 0 < t < 1 |
What’s a Seed? Read the Python docs here.
Learn more about the distribution functions on the SciPy random reference.
Outputs¶
A list, or nested lists.
Notes¶
Providing a float values as a Seed parameter may be unconventional, if you are uncomfortable with it you could place a FloatToInt node before the Seed parameter.
- (*) Notes on Float Low and Float High
Except on some distributions (Uniform, Beta and Triangular) the output values are mapped to fit the desired range. Due this mapping there will be at least one value which matches the “Float High” and another that matches the “Float Low”
- (**)Notes on Alpha and Beta values
On the “F Distribution” the minimum “Beta” is 0.025
On the “Pareto” distribution the minimum valid “Alpha” is 0.01
On the “Standard T” distribution the minimum valid “Alpha” is 0.017
On the “Triangular” distribution the “Alpha” parameter has to be greater than the “Float Low” and smaller than the “Float High”.
On the “Weibull the minimum valid “Alpha” is 0.0028.
On the “Zipf” distribution the minimum valid “Alpha” has to be bigger than 1.0
Remark¶
For random vector list see:
Generator-> Random Vector
for random numeric list see:
Number-> Random (float, count, 0.0-1.0)
Examples¶
With the “Weighted” distribution you can control the relative probability of each possible solution.
Number-> List Input
Vector-> Vector Rewire
Matrix-> Matrix In
Viz-> Viewer Draw
Generator-> Plane
Generator-> NGon
Generator-> Box
Generator-> Icosphere
List->List Main-> List Join
List->List Main-> List Length
List->List Struct-> List Item
Matrix-> Matrix In
Viz-> Viewer Draw
The distribution functions can lead from the default Uniform to a more organic result (Laplace) or with a desired tendency (Triangular)
Generator-> Line
Number-> A Number
Vector-> Vector Rewire
Matrix-> Matrix In
Viz-> Viewer Draw
Spatial-> Delaunay 2D
CAD-> Inset Special
Number-> A Number
Number-> Scalar Math
Vector-> Vector In
Matrix-> Matrix In
List->List Main-> List Length
Viz-> Viewer Draw
The “Unique” toggle will make sure there are not repeated numbers, very useful with the “List Item Node”.
Generator-> Box
Spacial-> Vector P Field
Number-> Scalar Math
List->List Main-> List Length
List->List Struct-> List Item
Viz-> Viewer Draw