Data Structures For Density Estimation