public void Analyze( double[] data )
    {
	int length = data.length;
	
	n_max = 0;
	double[] cumSum = getCumulative_Sum(data);

	//Seems OK	
// 	for( int i = 0; i < cumSum.length; i++ )
// 	    {
// 		System.out.println( cumSum[i]);
// 	    }
	
	//System.out.println("ind = " + ind + "\n");

	x_density[0] = 0;
	
	delta = 0;
	for( int i = 1; i < n_density; i++ )
	    {
		double yy = (double)i*1./((double)n_density);             // a point in the Y axis
		int ind = find_Index(cumSum, yy);
		
		//          Seems ok
		//System.out.println( "yy = " + yy + "    ind = " + ind + "\n" );
		
		x_density[i] = find_interpol_x(cumSum, ind, yy);
		//System.out.println( "x_density[" + i + "] = " + x_density[i] + "  ind = " + ind + "\n" );
		delta = delta + x_density[i] - x_density[i - 1];    // It should be always positive, therefore I didn't take the absalute value
		//System.out.println("Delta i = " + (x_density[i] - x_density[i - 1]) );
	    }
	delta = delta/(double)n_density;
	

	//============ Clustering should start from here =============
	
	clust_list = new ArrayList<ArrayList<Double>>();
	ArrayList<Double> cur_clust = new ArrayList<>();
	boolean keep_cluster = true;
	for( int i = 1; i < n_density; i++ )
	    {
		//System.out.println("i = " + i + " x_density = " + x_density[i]);
		if( keep_cluster == false )
		    {
			cur_clust.clear();
		    }
		//System.out.println("delta = " + delta + "\n");
			
		if( (x_density[i] - x_density[i-1]) < 0.2*delta )
		    {
			cur_clust.add((Double) x_density[i]);
			keep_cluster = true;
		    }
		else
		    {
			//System.out.println( "x[i] = " + x_density[i] +  "   x[i-1] = " + x_density[i-1] );
			keep_cluster = false; // This means that this point is already far from the previous, and should be put in another cluster
			//System.out.println("Size = " + cur_clust.size());
			if( cur_clust.size() > 0 )
			    {
				ArrayList<Double> tmp = new ArrayList<Double>(cur_clust);
				//tmp = cur_clust;
				System.out.println("adding to cluster cur_clust_size() = " + cur_clust.size());
				clust_list.add( (ArrayList<Double>) tmp );
			    }
		    }
	    }
	System.out.println("clust_lsut.size = " + clust_list.size() + "\n");

	if( clust_list.size() > 0 )
	    {
		for( int i = 0; i < clust_list.size(); i++ )
		    {
			ArrayList<Double> new_clust = clust_list.get(i);
			System.out.println("clust size = " + new_clust.size());
			double summ = 0;
			for( int j = 0; j < new_clust.size(); j++ )
			    {
				//System.out.println("cur_clust.get = " + new_clust.get(j)  );
				summ = summ + new_clust.get(j);
			    }
			summ = summ/((double)new_clust.size());
			
			System.out.println( "Center of " + i + "-th peak is " + summ);
		    }
	    }
	
	//int n_clusters = 
    }