code: public double[] getVector(int iid) {
  		if (iid < 0 || iid > loadCounter) {
  			System.out.println("Internal id " + iid + " is out of range!");
  			return null;
  		}
  		double[] vector = new double[vectorLength];
  		if (loadIndexInMemory) {
  			for (int i = 0; i < vectorLength; i++) {
  				vector[i] = vectorsList.getQuick(iid * vectorLength + i);
  			}
  		} else {
  			// get the vector from the BDB structure
  			DatabaseEntry key = new DatabaseEntry();
  			IntegerBinding.intToEntry(iid, key);
  			DatabaseEntry foundData = new DatabaseEntry();
  			if (iidToVectorDB.get(null, key, foundData, null) == OperationStatus.SUCCESS) {
  				TupleInput input = TupleBinding.entryToInput(foundData);
  				for (int i = 0; i < vectorLength; i++) {
  					vector[i] = input.readDouble();
  				}
  			} else {
  				System.out.println("Internal id " + iid + " is in range but vector was not found..");
  				System.out.println("Index is probably corrupted");
  				System.exit(0);
  				return null;
  			}
  		}
  		return vector;
  	}
docs: Returns the vector which was assigned the given internal id or null if the internal id does not exist.
  The vector is taken either from the ram-based (if loadIndexInMemory is true) or from the disk-based
  index.
  
  @param iid
  The internal id of the vector
  @return The vector with the given internal id or null if the internal id does not exist