docs: private double[][] solveInplace(double[][] B) {
      int mx = B.length;
      if(mx != m) {
        throw new IllegalArgumentException(ERR_MATRIX_DIMENSIONS);
      }
      if(!this.isNonsingular()) {
        throw new ArithmeticException(ERR_SINGULAR);
      }
      // Solve L*Y = B(piv,:)
      for(int k = 0; k < n; k++) {
        final double[] Bk = B[k];
        for(int i = k + 1; i < n; i++) {
          minusTimesEquals(B[i], Bk, LU[i][k]);
        }
      }
      // Solve U*X = Y;
      for(int k = n - 1; k >= 0; k--) {
        final double[] Bk = B[k];
        timesEquals(Bk, 1. / LU[k][k]);
        for(int i = 0; i < k; i++) {
          minusTimesEquals(B[i], Bk, LU[i][k]);
        }
      }
      return B;
    }