File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -789,7 +789,9 @@ cdef extern from "<symengine/matrix.h>" namespace "SymEngine":
789
789
void LDL(MatrixBase & L, MatrixBase & D) nogil
790
790
void LU_solve(const MatrixBase & b, MatrixBase & x) nogil
791
791
void FFLU(MatrixBase & LU) nogil
792
- void FFLDU(MatrixBase& L, MatrixBase & D, MatrixBase & U) nogil
792
+ void FFLDU(MatrixBase & L, MatrixBase & D, MatrixBase & U) nogil
793
+ void QR(MatrixBase & Q, MatrixBase & R) nogil
794
+ void cholesky(MatrixBase & L) nogil
793
795
794
796
cdef cppclass DenseMatrix(MatrixBase):
795
797
DenseMatrix()
Original file line number Diff line number Diff line change @@ -3604,6 +3604,17 @@ cdef class DenseMatrixBase(MatrixBase):
3604
3604
deref(self .thisptr).FFLDU(deref(L.thisptr), deref(D.thisptr), deref(U.thisptr))
3605
3605
return L, D, U
3606
3606
3607
+ def QR (self ):
3608
+ cdef DenseMatrixBase Q = self .__class__ (self .nrows(), self .ncols())
3609
+ cdef DenseMatrixBase R = self .__class__ (self .nrows(), self .ncols())
3610
+ deref(self .thisptr).QR(deref(Q.thisptr), deref(R.thisptr))
3611
+ return Q, R
3612
+
3613
+ def cholesky (self ):
3614
+ cdef DenseMatrixBase L = self .__class__ (self .nrows(), self .ncols())
3615
+ deref(self .thisptr).cholesky(deref(L.thisptr))
3616
+ return L
3617
+
3607
3618
def jacobian (self , x ):
3608
3619
cdef DenseMatrixBase x_ = sympify(x)
3609
3620
cdef DenseMatrixBase R = self .__class__ (self .nrows(), x.nrows())
You can’t perform that action at this time.
0 commit comments