# taucs_chsolve

solves a linear s.p.d. system A*X = B from Cholesky factors of the sparse A

### Syntax

[x] = taucs_chsolve(C_ptr, b [, A])

### Arguments

- C_ptr
a pointer to a handle of the Cholesky factors (C,p with A(p,p)=CC')

- b
a real column vector or a matrix (multiple rhs)

- x
a real column vector or a matrix in case of multiple rhs ( x(:,i) is solution of A x(:,i) = b(:,i))

- A
(optional) Real symetric positive definite (s.p.d.) matrix (to use for iterative refinement step)

### Description

This function must be used in conjunction with taucs_chfact which
computes the Cholesky factorization of a sparse real s.p.d. matrix.
When the matrix `A`

is provided, one iterative refinement
step is done (the refined solution is accepted if it improves the
2-norm of the residual `Ax-b`

).

Like in taucs_chfact the matrix A may be provided either in its complete form (that is with the lower triangle also) or only with its upper triangle.

### Examples

// We get some square sparse matrix that we are sure it is symetric positive definite: A = ReadHBSparse(SCI+"/modules/umfpack/demos/bcsstk24.rsa"); size(A) // We priorly compute its related Cholesky factors: Cfact = taucs_chfact(A); // We generate an arbitrary b for which we will look for an X such that A*x = b b = rand(size(A,1),1); // We call the solver x = taucs_chsolve(Cfact, b); // We accurately compute the numerical error r = A*x - b : r = res_with_prec(A, x, b); stdev(r, "*", 0) norm(r)Other examples are provided in the taucs_chfact page.

### See also

- taucs_chfact — cholesky factorization of a sparse s.p.d. matrix
- taucs_chdel — utility function used with taucs_chfact
- taucs_chinfo — get information on Cholesky factors
- taucs_chget — retrieve the Cholesky factorization at the scilab level
- cond2sp — computes an approximation of the 2-norm condition number of a s.p.d. sparse matrix

Report an issue | ||

<< taucs_chinfo | Interface avec UMFPACK (sparse) | umf_ludel >> |