if (newValue > targetMaxIndex) targetMaxIndex = v2;
	public double getSimilarity() {		queryHistogram.clear();		targetHistogram.clear();		int queryMaxIndex = 0, targetMaxIndex = 0;		for (int i = 0; i < queryPc; i++) {			double[] comps = getQuery().getColor(i).getComponents();			int v1 = Math.min((int)(comps[0]*binsCounts[0]),binsCounts[0]-1);			int factor = 1;			for (int j = 1; j < comps.length; j++) {				factor *= binsCounts[j-1];				v1 += factor * Math.min((int)(comps[j]*binsCounts[j]),binsCounts[j]-1);			}						Integer index = new Integer(v1);			Integer prev = (Integer)queryHistogram.get(index);			if (prev == null) prev = new Integer(0);						int newValue = prev.intValue()+1;			queryHistogram.put(index, new Integer(newValue));			if (newValue > queryMaxIndex) queryMaxIndex = v1;		}		for (int i = 0; i < targetPc; i++) {			double[] comps = getTarget().getColor(i).getComponents(); 			int v2 = Math.min((int)(comps[0]*binsCounts[0]),binsCounts[0]-1);			int factor = 1;			for (int j = 1; j < comps.length; j++) {				factor *= binsCounts[j-1];				v2 += factor * Math.min((int)(comps[j]*binsCounts[j]), binsCounts[j]-1);			}						Integer index = new Integer(v2);			Integer prev = (Integer)targetHistogram.get(index);			if (prev == null) prev = new Integer(0);						int newValue = prev.intValue()+1;			targetHistogram.put(index, new Integer(newValue));			if (newValue > targetMaxIndex) targetMaxIndex = v2;		}				fuzzyMeasure.setQuery			(new FuzzyHistogram(queryHistogram, queryMaxIndex, queryHistLength, smoother));		fuzzyMeasure.setTarget			(new FuzzyHistogram(targetHistogram, targetMaxIndex, targetHistLength, smoother));		return fuzzyMeasure.		getSimilarity();	}