code: private static Vec getColumn(Matrix x)
      {
          Vec t;
          
          for(int i = 0; i < x.cols(); i++)
          {
              t = x.getColumn(i);
              if(t.dot(t) > 0 )
                  return t;
          }
          
          throw new ArithmeticException("Matrix is essentially zero");
      }
docs: Returns the first non zero column
  @param x the matrix to get a column from
  @return the first non zero column