File: ludcmd.x

package info (click to toggle)
iraf 2.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,000 kB
  • sloc: ansic: 115,890; fortran: 74,576; lisp: 18,888; yacc: 5,642; sh: 961; lex: 596; makefile: 509; asm: 159; csh: 54; xml: 33; sed: 4
file content (24 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ludcmd -- lower-upper decomposition
# Double-precision version of ludcmp
# This routine decomposes a matrix (in-place) into lower and upper
# triangular portions.  Use lubksd to obtain a solution to A * X = B
# or to compute the inverse of the matrix A.
# If the matrix is singular, ISTAT is set to one.
#
# This routine simply calls the LU decomposition routine provided by LAPACK.

procedure ludcmd (a, n, np, indx, d, istat)

double	a[np,np]	# io: input a, output decomposed a
int	n		# i: logical size of a is n x n
int	np		# i: space allocated for a
int	indx[n]		# o: index to be used by xt_lubksb
double	d		# o: +1 or -1
int	istat		# o: OK if no problem; 1 if matrix is singular

begin
	d = 1.0
	call dgetrf(n, n, a, np, indx, istat)
	if (istat > 0)
	   istat = 1
end