On Sun, 1 Jan 2012 14:35:04 -0500
"Toby Inkster via RT" <bug-Quantum-Superpositions@rt.cpan.org> wrote:
Show quoted text> Sun Jan 01 14:35:03 2012: Request 73655 was acted upon.
> Transaction: Ticket created by TOBYINK
> Queue: Quantum-Superpositions
> Subject: Weighted superposition
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: mail@tobyinkster.co.uk
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=73655 >
>
>
> A weighted superposition would be the same as an "any" superposition,
> except that not all possibilities would be equally likely...
>
> $unfair_dice_1 = weighted(
> 1 => 4, # value => weighting
> 2 => 1,
> 3 => 1,
> 4 => 1,
> 5 => 1,
> 6 => 1,
> );
> $unfair_dice_2 = weighted(
> 1 => 3,
> 2 => 1,
> 3 => 2,
> 4 => 1,
> 5 => 1,
> 6 => 1,
> );
> $total = $unfair_dice_1 + $unfair_dice_2;
>
> I'd be happy to provide a patch for this feature, if it would be likely
> to be accepted.
Q1: Have you actually looked at the source for Q::S?
Especially the part below "No user servicable code
below this line"?
If so, and you actually have time to work on this at all,
I can send you the current version of the code. The newer
version replaces all of the multimethods with a simpler,
fixed dispatch and should actually make the thing usable
in real life. I just havn't had time to finish it over the
past few years.
--
Steven Lembark 3646 Flora Pl
Workhorse Computing St Louis, MO 63110
lembark@wrkhors.com +1 888 359 3508