Determining the density of states for classical statistical models: A random walk algorithm to produce a flat histogram

Determining the density of states for classical statistical models: A random walk algorithm to produce a flat histogram