private static int[] find2ClosestMixtureModels(HierarchicalMixtureModel[] hmmArray, Clustering.CLUSTERING_TYPE type, LINKAGE_CRITERION linkage){
		
		// Variable
		int[]  index = new int[2];
		int    n     = hmmArray.length;
		double dmin  = Double.MAX_VALUE;
		
		// Loops
		for (int i=0; i<n; i++)
			for (int j=0; j<n; j++){
				if (i!=j) {

					// Current mixture models
					MixtureModel mm1 = hmmArray[i].node;
					MixtureModel mm2 = hmmArray[j].node;

					// Distance (min, max, or mean) between the two mixture models
					double d=Double.MAX_VALUE;
					if (linkage==LINKAGE_CRITERION.MINIMUM_DISTANCE)
						d = computeMinDistance(mm1, mm2, type) * hmmArray[i].weight * hmmArray[j].weight;
					else if (linkage==LINKAGE_CRITERION.MAXIMUM_DISTANCE)
						d = computeMaxDistance(mm1, mm2, type) * hmmArray[i].weight * hmmArray[j].weight;
					else if (linkage==LINKAGE_CRITERION.AVERAGE_DISTANCE)
						d = computeAverageDistance(mm1, mm2, type) * hmmArray[i].weight * hmmArray[j].weight;

					// Remember the indexes
					if (d<dmin){
						index[0] = i;
						index[1] = j;
						dmin     = d;
					}
				}
			}
		
		// Return the indexes
		return index;
	}