[Haskell-cafe] How to use randomized algorithm within the implementation of pure data structures?
Carter Schonwald
carter.schonwald at gmail.com
Tue Nov 4 13:33:45 UTC 2014
Threading the state can also mean using the STATE monad as suggested
Earlier.
On Nov 4, 2014 3:54 AM, "Hiromi ISHII" <konn.jinro at gmail.com> wrote:
> Hi,
>
>
> On 2014/11/02 18:50, Travis Cardwell <travis.cardwell at extellisys.com>
> wrote:
>
> > Indeed: many algorithms merely require values from a uniform
> distribution,
> > not necessarily random numbers. I was hopeful that Cantor-Zassenhaus
> > would be one of them.
> >
> > Looking at your code [1], I see that you are exporting both
> > `equalDegreeSplitM`, which uses `uniform` from `Control.Monad.Random`,
> and
> > `equalDegreeFactorM`, which iteratively calls `equalDegreeSplitM`. One
> of
> > the challenges of using a pure uniform stream is threading the state:
> > since both functions are exported, implementation details would leak
> anyway.
>
> "Threading the state" means "using ST monad", right?
> If so, I think we can use algebraic numbers only within ST monad, so it
> would be too restrictive to do some calculation.
>
> > Great work, by the way! :)
>
> Thanks!
>
> -- Hiromi ISHII
> konn.jinro at gmail.com
>
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141104/89672ea2/attachment.html>
More information about the Haskell-Cafe
mailing list