public double calculateDistance(DataPoint other) {
		if (this.equals(other))
			return 1;
		HashMap<Integer, Double> minHash, maxHash;
		HashMap<Integer, Double> current = getVector(), otherHashMap = other
				.getVector();

		if (current.size() < otherHashMap.size()) {
			minHash = current;
			maxHash = otherHashMap;
		} else {
			minHash = otherHashMap;
			maxHash = current;
		}
		double d1_d2 = 0;
		for (int key : minHash.keySet()) {
			if (maxHash.containsKey(key))
				d1_d2 += maxHash.get(key) * minHash.get(key);
		}
		if (this.value == 0)
			calculateValue();
		if (other.value == 0)
			other.calculateValue();
		double denum = this.value * other.value;
		return 1 - (d1_d2 / denum);
		// HashMap<Integer, Double> dim1 = getVector();
		// HashMap<Integer, Double> dim2 = other.getVector();
		// double ECDis = 0.0;
		// int dimSize = dim1.size();
		// for (int k = 0; k < dimSize; k++) {
		// ECDis += (dim1.get(k) - dim2.get(k))
		// * ((dim1.get(k) - dim2.get(k)));
		// }
		// ECDis = Math.sqrt(ECDis);
		// return ECDis;
	}