code: public static boolean canSwapCols(Matrix matrix, int col1, int col2, int row1) {
  		boolean response = true;
  		for (int row = row1 + 1; row < matrix.getRowCount(); ++row) {
  			if (0 == matrix.getAsDouble(row, col1)) {
  				if (0 != matrix.getAsDouble(row, col2)) {
  					response = false;
  					break;
  				}
  			}
  		}
  		return response;
  	}
docs: Check to see if columns can be swapped - part of the bandwidth reduction
  algorithm.
  
  @param matrix
  the matrix to check
  @param col1
  the first column
  @param col2
  the second column
  @param row1
  the row
  @return true if the columns can be swapped