code: public static double[][] times(double[][] matrix1, double[][] matrix2, int timesInner) {
  		int timesRows = matrix1.length;
  		int timesCols = matrix2[0].length;
  		double[][] response = new double[timesRows][timesCols];
  		for (int row = 0; row < timesRows; row++) {
  			for (int col = 0; col < timesCols; col++) {
  				for (int inner = 0; inner < timesInner; inner++) {
  					response[row][col] = matrix1[row][inner] * matrix2[inner][col]
  							+ response[row][col];
  				}
  			}
  		}
  		return response;
  	}
docs: This routine performs the matrix multiplication. The final matrix size is
  taken from the rows of the left matrix and the columns of the right
  matrix. The timesInner is the minimum of the left columns and the right
  rows.
  
  @param matrix1
  the first matrix
  @param matrix2
  the second matrix
  @param timesInner
  number of rows/columns to process
  @return product of the two matrices