Efficient, multiple-range random walk algorithm to calculate the density of states.