move generating optimization data part into generate_optimizationdata function.
all GaussiamM use GaussianN generated by generateGaussiamM function
fix bugs in generateDistanceMat function.