#13674: Cholesky decomposition for sparse matrices
------------------------------+---------------------------------------------
Reporter: r.gaia.cs | Owner: jason, was
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.5
Component: linear algebra | Keywords: matrix, decomposition,
cholesky, sparse
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
The Cholesky decomposition are implemented in the file
source:sage/matrix/matrix2.pyx for some subfield of the algebraic numbers.
In this implementation the base ring must be exact or, for numerical work,
a
matrix with a base ring of ``RDF`` or ``CDF`` must be used.
For the numerical work it's used the Cholesky decomposition implemented in
source:sage/matrix/matrix_double_dense.pyx and because of this a error
raised when try to compute the numerical Cholesky decomposition of a
sparse matrix.
{{{
sage: A = matrix(QQ, [[1, 1], [1, 2]])
sage: A.cholesky()
[1 0]
[1 1]
sage: A = matrix(QQ, [[1, 1], [1, 2]], sparse=True)
sage: A.cholesky()
[1 0]
[1 1]
sage: A = matrix(RDF, [[1, 1], [1, 2]], sparse=True)
sage: A = matrix(RDF, [[1, 1], [1, 2]])
sage: A.cholesky()
[1.0 0.0]
[1.0 1.0]
sage: A = matrix(RDF, [[1, 1], [1, 2]], sparse=True)
sage: A.cholesky()
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/raniere/opt/sage/devel/sage-rcm/sage/matrix/<ipython console> in
<module>()
/home/raniere/opt/sage/local/lib/python2.7/site-
packages/sage/matrix/matrix2.so in sage.matrix.matrix2.Matrix.cholesky
(sage/matrix/matrix2.c:47738)()
9867 if not self.base_ring().is_exact():
9868 msg = 'base ring of the matrix must be exact, not
{0}'
-> 9869 raise TypeError(msg.format(self.base_ring()))
9870 try:
9871 posdef = self.is_positive_definite()
TypeError: base ring of the matrix must be exact, not Real Double Field
}}}
For this solve this ticket the numerical sparce Cholesky decompostion need
to be implemented.
For more information about this topic see
https://groups.google.com/forum/?fromgroups=#!topic/sage-
support/do55Fayur6U.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13674>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.