Skip to content

Releases: k8gb-io/go-weight-shuffling

v0.4.0 ⭐ Full portions support

08 Sep 14:57
Compare
Choose a tag to compare

see README.md

Now I can use as PDF {50,0,0,50}, or {1,0,0,1} Both expressions are equivalent.

v0.3.0 🚀 - stable

30 Aug 08:48
87aa056
Compare
Choose a tag to compare
Merge pull request #3 from k8gb-io/fix-50-50-0

Fix , distribution 50-50-0 is not shuffling

v0.2.0 ⭐

25 Aug 11:25
5fdf4f1
Compare
Choose a tag to compare

PickVector settings argument

The Settings argument defines how the PickVector function will return indexes. Imagine you have
a PDF for three different parts and you set one of them to 0 (just turn it off, because the
probability of this index will be 0). The solution is not universal, each use-case requires
different behavior. Currently we define two versions of the behavior.

  • KeepIndexesForZeroPDF keeps indexes for zero pdf elements; e.g: for pdf=[0,50,50,0,0,0] returns [1,2,0,3,4,5] or [2,1,0,3,4,5]
  • IgnoreIndexesForZeroPDF filter indexes for zero pdf elements; e.g: for pdf=[0,50,50,0,0,0] returns [1,2] or [2,1]