code: public Matrix solve (Matrix B) {
        return (m == n ? (new LUDecomposition(this)).solve(B) :
                         (new QRDecomposition(this)).solve(B));
     }
docs: Solve A*X = B
  @param B    right hand side
  @return     solution if A is square, least squares solution otherwise