Random Num Gen ============== .. image:: https://user-images.githubusercontent.com/14288520/189126776-794ea0fb-f6c1-4ec0-9965-cdd5009d3fe7.png :target: https://user-images.githubusercontent.com/14288520/189126776-794ea0fb-f6c1-4ec0-9965-cdd5009d3fe7.png 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. | | | | | | * Beta, Binomial, Chi_square, Exponential, F Distrib., Gamma, Geometric, | | | * Gumbel, Laplace, Logistic, Log Normal, Log Series, Negative Binomial, | | | * Noncentered Chi-Square, Normal, Pareto, Poisson, Power, RayLeigh, | | | * Standard Cauchy, Standard Gamma, Standard T, Triangular, Uniform, | | | * Vonmises, Wald, Weibull, Zipf | +----------------+--------------------------------------------------------------------------+ | 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-> :doc:`Random Vector ` for random numeric list see: * Number-> :doc:`Random ` (float, count, 0.0-1.0) Examples -------- With the "Weighted" distribution you can control the relative probability of each possible solution. .. image:: https://user-images.githubusercontent.com/10011941/46135042-9816dd00-c244-11e8-80e4-41195b3fbdcd.png :target: https://user-images.githubusercontent.com/10011941/46135042-9816dd00-c244-11e8-80e4-41195b3fbdcd.png :alt: Weighted_Distribution1.PNG * Number-> :doc:`List Input ` * Vector-> :doc:`Vector Rewire ` * Matrix-> :doc:`Matrix In ` * Viz-> :doc:`Viewer Draw ` .. image:: https://user-images.githubusercontent.com/10011941/46135049-9baa6400-c244-11e8-8cc9-3903e05bcd02.png :target: https://user-images.githubusercontent.com/10011941/46135049-9baa6400-c244-11e8-8cc9-3903e05bcd02.png :alt: Weighted_Distribution2.PNG * Generator-> :doc:`Plane ` * Generator-> :doc:`NGon ` * Generator-> :doc:`Box ` * Generator-> :doc:`Icosphere ` * List->List Main-> :doc:`List Join ` * List->List Main-> :doc:`List Length ` * List->List Struct-> :doc:`List Item ` * Matrix-> :doc:`Matrix In ` * Viz-> :doc:`Viewer Draw ` The distribution functions can lead from the default Uniform to a more organic result (Laplace) or with a desired tendency (Triangular) .. image:: https://user-images.githubusercontent.com/10011941/46135062-9f3deb00-c244-11e8-9de4-b06c044d5520.png :target: https://user-images.githubusercontent.com/10011941/46135062-9f3deb00-c244-11e8-9de4-b06c044d5520.png :alt: Random_Distribution3.PNG * Generator-> :doc:`Line ` * Number-> :doc:`A Number ` * Vector-> :doc:`Vector Rewire ` * Matrix-> :doc:`Matrix In ` * Viz-> :doc:`Viewer Draw ` .. image:: https://user-images.githubusercontent.com/10011941/46135077-a82ebc80-c244-11e8-9616-6e8cb7218726.png :target: https://user-images.githubusercontent.com/10011941/46135077-a82ebc80-c244-11e8-9616-6e8cb7218726.png :alt: Random_Distribution4.PNG * Spatial-> :doc:`Delaunay 2D ` * CAD-> :doc:`Inset Special ` * Number-> :doc:`A Number ` * Number-> :doc:`Scalar Math ` * Vector-> :doc:`Vector In ` * Matrix-> :doc:`Matrix In ` * List->List Main-> :doc:`List Length ` * Viz-> :doc:`Viewer Draw ` The "Unique" toggle will make sure there are not repeated numbers, very useful with the "List Item Node". .. image:: https://user-images.githubusercontent.com/10011941/54881844-9e34f180-4e54-11e9-8c92-3eee832c6958.png :target: https://user-images.githubusercontent.com/10011941/54881844-9e34f180-4e54-11e9-8c92-3eee832c6958.png :alt: Random_Distribution_Swerchok_parametric_design_random_sample_unique_example * Generator-> :doc:`Box ` * Spacial-> :doc:`Vector P Field ` * Number-> :doc:`Scalar Math ` * List->List Main-> :doc:`List Length ` * List->List Struct-> :doc:`List Item ` * Viz-> :doc:`Viewer Draw `