code: public DenseMatrix solve(DenseMatrix B) throws MatrixNotSPDException {
          if (notspd)
              throw new MatrixNotSPDException();
          if (n != B.numRows())
              throw new IllegalArgumentException("n != B.numRows()");
  
          intW info = new intW(0);
          if (upper)
              LAPACK.getInstance().dpotrs(UpLo.Upper.netlib(), Cu.numRows(),
                      B.numColumns(), Cu.getData(), Matrices.ld(Cu.numRows()),
                      B.getData(), Matrices.ld(Cu.numRows()), info);
          else
              LAPACK.getInstance().dpotrs(UpLo.Lower.netlib(), Cl.numRows(),
                      B.numColumns(), Cl.getData(), Matrices.ld(Cl.numRows()),
                      B.getData(), Matrices.ld(Cl.numRows()), info);
  
          if (info.val < 0)
              throw new IllegalArgumentException();
  
          return B;
      }
docs: Solves for <code>B</code>, overwriting it on return