ComputeDensity implemented.