private HashFamily getHashFamily(double radius,String hashFamilyType,int dimensions){
		HashFamily family = null;
		if(hashFamilyType.equalsIgnoreCase("cos")){
			family = new CosineHashFamily(dimensions);
		}else if(hashFamilyType.equalsIgnoreCase("l1")){
			int w = (int) (10 * radius);
			w = w == 0 ? 1 : w;
			family = new CityBlockHashFamily(w,dimensions);
		}else if(hashFamilyType.equalsIgnoreCase("l2")){
			int w = (int) (10 * radius);
			w = w == 0 ? 1 : w;
			family = new EuclidianHashFamily(w,dimensions);
		}else{
			new IllegalArgumentException(hashFamilyType + " is unknown, should be one of cos|l1|l2" );
		}
		return family;
	}