Tag Archives: sampling

Lightweight invertible enumerations in Haskell

In a previous post I introduced a new Haskell library for enumerations (now on Hackage as simple-enumeration). The Data.Enumeration module defines a type Enumeration a, represented simply by a function Integer -> a which picks out the value of type … Continue reading

Posted in combinatorics, haskell, projects | Tagged , , , , , , | 2 Comments

Lightweight, efficiently sampleable enumerations in Haskell

For another project I’m working on, I needed a way to enumerate and randomly sample values from various potentially infinite collections. There are plenty of packages in this space, but none of them quite fit my needs: universe (and related … Continue reading

Posted in combinatorics, haskell, projects | Tagged , , , , | 11 Comments

Any clues about this Newton iteration formula with Jacobian matrix?

A while ago I wrote about using Boltzmann sampling to generate random instances of algebraic data types, and mentioned that I have some code I inherited for doing the core computations. There is one part of the code that I … Continue reading

Posted in math | Tagged , , , , , , | 8 Comments

Boltzmann sampling for generic Arbitrary instances

Update, 7/17/2017: this now exists; see https://byorgey.wordpress.com/2016/09/20/the-generic-random-library-part-1-simple-generic-arbitrary-instances/ . tl;dr: I know how to generate random instances of data types in a generic way, and even have some old code that already does all the hard work, but won’t have time … Continue reading

Posted in combinatorics, haskell, math, species | Tagged , , , , , | 14 Comments