image.png

Category: Math Kind: Operation Tags: Cull Description: Randomly remove a number of elements from a list

<aside> 💡

Random numbers generated by computers are not truly random, but rather pseudo-random. They are produced by algorithms that, while appearing random, are deterministic and predictable. This means the same algorithm will generate the same sequence of numbers if given the same starting conditions.

In random number generation, a seed is a starting number used to initialize a random number generator (RNG). It's essentially a point within a predetermined sequence of "random" numbers where the generator starts producing values.

</aside>

Inputs

Name Abbreviation Type Access Description
List L Any List The list to reduce
Number N Number Item The number of elements to remove
Seed S Number Item The seed for the random generator

Outputs

Name Abbreviation Type Access Description
Reduced R Any List The reduced list

How to

  1. Feed in a list

    1. You could use the result of any node the produces or processes a list, such as map, Filter, encapsulate in list, etc
    2. Or, you can manually create a list using a panel
  2. Feed in a number of items to cull from the list

    1. This could be the a numeric result of another node
    2. Or, you can use a number node
    3. Or, you can type numbers into the boxes
  3. Feed in a number for the seed

    1. This could be the a numeric result of another node
    2. Or, you can use a number node
    3. Or, you can type numbers into the boxes
  4. The result is the list with the number of items randomly removed

    <aside> 💡

    The random list item is selected by the node producing a random integer, representing the index in the list on the item.

    </aside>