public double getDistance(double similarity) {
		double result = (1 - similarity);   //default: linear distance measure
		switch (TRANSFORM) {
			case INVERSE:
				result = (1 / similarity);
				break;
			case INVERSE_OFFSET:
				result = (1 / similarity) - 1;
				break;
			case INVERSE_2_OFFSET:
				result = (1 / similarity / similarity) - 1;
				break;
			case INVERSE_3_OFFSET:
				result = (1 / similarity / similarity / similarity) - 1;
				break;
		}
		return result;
	}