code: public static double[][] readQuantizer(String filename, int numCentroids, int centroidLength)
  			throws IOException {
  		double[][] quantizer = new double[numCentroids][centroidLength];
  		// load the quantizer
  		BufferedReader in = new BufferedReader(new FileReader(filename));
  		String line;
  		int counter = 0;
  		while ((line = in.readLine()) != null) {
  			// skip header lines
  			if (!line.contains(",")) { // not a csv data line
  				continue;
  			}
  			String[] centerStrings = line.split(",");
  			for (int i = 0; i < centerStrings.length; i++) {
  				quantizer[counter][i] = Double.parseDouble(centerStrings[i]);
  			}
  			counter++;
  		}
  		in.close();
  		return quantizer;
  	}
docs: Reads a quantizer (codebook) from the given file and returns it in a 2-dimensional double array.
  
  @param filename
  name of the file containing the quantizer
  @param numCentroids
  number of centroids of the quantizer
  @param centroidLength
  length of each centroid
  @return the quantizer as a 2-dimensional double array
  @throws IOException