Added an optimal quantization algorithm to Density_2