Tag Archives: algorithms

Quick and Easy Gaussian Random Numbers

Generating random numbers which fit a normal distribution is essential for stochastic optimization, especially for continuous evolutionary algorithms. For high-quality results the weapon of choice is the Box–Muller transform. It’s a little expensive; it involves exponents and trigonometry and such. … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Ordering Tagged Items by Similarity

So I’ve got this web-based image gallery. The images in it are organized with simple tags (there’s a many-to-many relationship between images and tags). Every image has at least one tag, and almost all images have several tags. When a … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Basic Spatial Hashing with Boost

So let’s say you’ve got some particles in 2-dimensional space. There they are. Now let’s say you want any two particles which are very close to each other to interact. You need to know which pairs are close enough. You … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment