EVSL
1.1.0
EigenValues Slicing Library
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
EXTERNAL
CXSparse
Source
cs_ltsolve.c
Go to the documentation of this file.
1
#include "
cs.h
"
2
/* solve L'x=b where x and b are dense. x=b on input, solution on output. */
3
CS_INT
cs_ltsolve
(
const
cs
*L,
CS_ENTRY
*x)
4
{
5
CS_INT
p, j, n, *Lp, *Li ;
6
CS_ENTRY
*Lx ;
7
if
(!
CS_CSC
(L) || !x)
return
(0) ;
/* check inputs */
8
n = L->n ; Lp = L->p ; Li = L->i ; Lx = L->x ;
9
for
(j = n-1 ; j >= 0 ; j--)
10
{
11
for
(p = Lp [j]+1 ; p < Lp [j+1] ; p++)
12
{
13
x [j] -=
CS_CONJ
(Lx [p]) * x [Li [p]] ;
14
}
15
x [j] /=
CS_CONJ
(Lx [Lp [j]]) ;
16
}
17
return
(1) ;
18
}
cs
#define cs
Definition:
cs.h:637
CS_CONJ
#define CS_CONJ(x)
Definition:
cs.h:649
CS_ENTRY
#define CS_ENTRY
Definition:
cs.h:635
cs_ltsolve
CS_INT cs_ltsolve(const cs *L, CS_ENTRY *x)
Definition:
cs_ltsolve.c:3
cs.h
CS_CSC
#define CS_CSC(A)
Definition:
cs.h:659
CS_INT
#define CS_INT
Definition:
cs.h:627
Generated by
1.8.6