public void insertionSort(double[] probs, int[] probs_ids)
	{
		int i=0, j=0;
		for(j=1;j<probs.length;j++)
		{
			int key=probs_ids[j];
			i=j-1;
			while(i>=0 && probs[probs_ids[i]]>probs[key])
			{
				probs_ids[i+1]=probs_ids[i];
				i=i-1;
			}
			probs_ids[i+1]=key;
		}
	}