BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2024-05-19

role Mixy

Collection of distinct objects with Real weights

role Mixy does Baggy { }
Code

A role for collections of weighted values. See Mix and MixHash. Mixy objects differ from Baggy objects in that the weights of Mixy are Reals rather than Ints.

Methods§

method roll§

method roll($count = 1)
Code

Similar to a Bag.roll, but with Real weights rather than integral ones.

method pick§

method pick($?)
Code

Throws an exception. The feature is not supported on the type, since there's no clear value to subtract from non-integral weights, to make it work.

method grab§

method grab($?)
Code

Throws an exception. The feature is not supported on the type, since there's no clear value to subtract from non-integral weights, to make it work.

method kxxv§

method kxxv()
Code

Throws an exception. The feature is not supported on the type, since there's no clear value to subtract from non-integral weights, to make it work.

See Also§

Sets, Bags, and Mixes

Class relation diagram§

Rakudo Type Relation for Mixy Mixy Mixy Baggy Baggy Mixy->Baggy does