public MetaData generate(){
		MetaData metadata = new MetaData();
		
		for(int i = 0; i<data.size(); i++){
			KAry theData = data.get(i); // we get the coordinates of data i
			
			int hiCnt = metadata.getAllHi().size(); // how many of hi elements
			
			ArrayList<Integer> overlapsetOfNewData = new ArrayList<Integer>(); // the overlap set of new element
			
			boolean isNegalectable = false;
			
			for(int j = 0; j< hiCnt; j++){

				isNegalectable = true;
				boolean isOverlap = true;

				KAry existingData = metadata.getHi(j).getCoordinates();
				int datadim = existingData.getDim();

				for(int k = 0; k<datadim; k++){
					// if the distance between the two coordinates are smaller than the hiRatio*interval on all dimensions, then the new element is an li element.
					if(Math.abs(theData.get(k) - existingData.get(k)) >= interval) {
						isOverlap = false;
						isNegalectable = false;
						break;
					}
					 
					if(Math.abs(theData.get(k) - existingData.get(k))*10000 > interval*10000*hiRatio){
						isNegalectable = false;
					}
				}
				
				if(isNegalectable){
					metadata.addLi(theData);
					break;
				}
				
				if(isOverlap){
					overlapsetOfNewData.add(j);
				}
			}
			
			if(!isNegalectable){
				OneMetaData theMetaData = new OneMetaData(theData, overlapsetOfNewData);
				metadata.addHi(theMetaData);
				int newestIdx = metadata.getAllHi().size()-1;
				
				for(int ii = 0; ii<overlapsetOfNewData.size(); ii++){
					metadata.getHi(overlapsetOfNewData.get(ii)).getOLSet().add(newestIdx);
				}
			}
		}
		
		return metadata;
	}