FillArrayRandomDuplicates_v2 Op

FillArrayRandomDuplicates

Fill an array with random duplicates


<p>example you have an array with 3 values [0,1,2] and you want to have an array of with a length of 9 with these values You pass the smaller array into FillArrayRandomDuplicates and define a length of 9 You&#39;ll then get something like [0,1,2,0,1,2,2,0,0]</p> <p>Note that the original array that&#39;s passed in will always be in the start of the new array. In this case the 1st 3 values will always be 0,1,2</p>


Full Name
  • Ops.Array.FillArrayRandomDuplicates_v2
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


INPUT PORTS


Array (Array)

<p>The array used to get random values from</p>

Num Elements (Number:

<i>integer</i>

)

<p>The length of the new array</p>

Random seed (Number)

OUTPUT PORTS


Result (Array)

<p>The generated array with the new values.</p>


Patches using FillArrayRandomDuplicates_v2

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarpandur - 2019-01-29 17:18
added random seed input portuser avatarandro - 2019-02-08 13:18
cloned op from Ops.Array.FillArrayRandomDuplicatesuser avatarpandur - 2022-11-23 14:06
Ops.User.pandur.FillArrayRandomDuplicatesV2 renamed to Ops.Array.FillArrayRandomDuplicates_v2user avatarpandur - 2022-11-23 14:14
bugfixarray now has the correct lengthuser avatarpandur - 2022-12-14 17:21
improvementno trigger required anymore to generateuser avatarpandur - 2022-12-14 17:21