Mercurial > octave-nkf
comparison liboctave/UMFPACK/UMFPACK/Include/umfpack_get_determinant.h @ 5164:57077d0ddc8e
[project @ 2005-02-25 19:55:24 by jwe]
author | jwe |
---|---|
date | Fri, 25 Feb 2005 19:55:28 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5163:9f3299378193 | 5164:57077d0ddc8e |
---|---|
1 /* ========================================================================== */ | |
2 /* === UMFPACK_get_determinant ============================================== */ | |
3 /* ========================================================================== */ | |
4 | |
5 /* -------------------------------------------------------------------------- */ | |
6 /* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ | |
7 /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ | |
8 /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ | |
9 /* -------------------------------------------------------------------------- */ | |
10 | |
11 int umfpack_di_get_determinant | |
12 ( | |
13 double *Mx, | |
14 double *Ex, | |
15 void *NumericHandle, | |
16 double User_Info [UMFPACK_INFO] | |
17 ) ; | |
18 | |
19 long umfpack_dl_get_determinant | |
20 ( | |
21 double *Mx, | |
22 double *Ex, | |
23 void *NumericHandle, | |
24 double User_Info [UMFPACK_INFO] | |
25 ) ; | |
26 | |
27 int umfpack_zi_get_determinant | |
28 ( | |
29 double *Mx, | |
30 double *Mz, | |
31 double *Ex, | |
32 void *NumericHandle, | |
33 double User_Info [UMFPACK_INFO] | |
34 ) ; | |
35 | |
36 long umfpack_zl_get_determinant | |
37 ( | |
38 double *Mx, | |
39 double *Mz, | |
40 double *Ex, | |
41 void *NumericHandle, | |
42 double User_Info [UMFPACK_INFO] | |
43 ) ; | |
44 | |
45 /* | |
46 double int Syntax: | |
47 | |
48 #include "umfpack.h" | |
49 void *Numeric ; | |
50 int status ; | |
51 double Mx, Ex, Info [UMFPACK_INFO] ; | |
52 status = umfpack_di_get_determinant (&Mx, &Ex, Numeric, Info) ; | |
53 | |
54 double long Syntax: | |
55 | |
56 #include "umfpack.h" | |
57 void *Numeric ; | |
58 long status ; | |
59 double Mx, Ex, Info [UMFPACK_INFO] ; | |
60 status = umfpack_dl_get_determinant (&Mx, &Ex, Numeric, Info) ; | |
61 | |
62 complex int Syntax: | |
63 | |
64 #include "umfpack.h" | |
65 void *Numeric ; | |
66 int status ; | |
67 double Mx, Mz, Ex, Info [UMFPACK_INFO] ; | |
68 status = umfpack_zi_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ; | |
69 | |
70 complex int Syntax: | |
71 | |
72 #include "umfpack.h" | |
73 void *Numeric ; | |
74 long status ; | |
75 double *Mx, *Mz, *Ex, Info [UMFPACK_INFO] ; | |
76 status = umfpack_zl_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ; | |
77 | |
78 packed complex int Syntax: | |
79 | |
80 Same as above, except Mz is NULL. | |
81 | |
82 Purpose: | |
83 | |
84 Using the LU factors and the permutation vectors contained in the Numeric | |
85 object, calculate the determinant of the matrix A. | |
86 | |
87 The value of the determinant can be returned in two forms, depending on | |
88 whether Ex is NULL or not. If Ex is NULL then the value of the determinant | |
89 is returned on Mx and Mz for the real and imaginary parts. However, to | |
90 avoid over- or underflows, the determinant can be split into a mantissa | |
91 and exponent, and the parts returned separately, in which case Ex is not | |
92 NULL. The actual determinant is then given by | |
93 | |
94 double det ; | |
95 det = Mx * pow (10.0, Ex) ; | |
96 | |
97 for the double case, or | |
98 | |
99 double det [2] ; | |
100 det [0] = Mx * pow (10.0, Ex) ; // real part | |
101 det [1] = Mz * pow (10.0, Ex) ; // imaginary part | |
102 | |
103 for the complex case. Information on if the determinant will or has | |
104 over or under-flowed is given by Info [UMFPACK_STATUS]. | |
105 | |
106 In the "packed complex" syntax, Mx [0] holds the real part and Mx [1] | |
107 holds the imaginary part. Mz is not used (it is NULL). | |
108 | |
109 Returns: | |
110 | |
111 Returns UMFPACK_OK if sucessful. Returns UMFPACK_ERROR_out_of_memory if | |
112 insufficient memory is available for the n_row integer workspace that | |
113 umfpack_*_get_determinant allocates to construct pivots from the | |
114 permutation vectors. Returns UMFPACK_ERROR_invalid_Numeric_object if the | |
115 Numeric object provided as input is invalid. Returns | |
116 UMFPACK_WARNING_singular_matrix if the determinant is zero. Returns | |
117 UMFPACK_WARNING_determinant_underflow or | |
118 UMFPACK_WARNING_determinant_overflow if the determinant has underflowed | |
119 overflowed (for the case when Ex is NULL), or will overflow if Ex is not | |
120 NULL and det is computed (see above) in the user program. | |
121 | |
122 Arguments: | |
123 | |
124 double *Mx ; Output argument (array of size 1, or size 2 if Mz is NULL) | |
125 double *Mz ; Output argument (optional) | |
126 double *Ex ; Output argument (optional) | |
127 | |
128 The determinant returned in mantissa/exponent form, as discussed above. | |
129 If Mz is NULL, then both the original and imaginary parts will be | |
130 returned in Mx. If Ex is NULL then the determinant is returned directly | |
131 in Mx and Mz (or Mx [0] and Mx [1] if Mz is NULL), rather than in | |
132 mantissa/exponent form. | |
133 | |
134 void *Numeric ; Input argument, not modified. | |
135 | |
136 Numeric must point to a valid Numeric object, computed by | |
137 umfpack_*_numeric. | |
138 | |
139 double Info [UMFPACK_INFO] ; Output argument. | |
140 | |
141 Contains information about the calculation of the determinant. If a | |
142 (double *) NULL pointer is passed, then no statistics are returned in | |
143 Info (this is not an error condition). The following statistics are | |
144 computed in umfpack_*_determinant: | |
145 | |
146 Info [UMFPACK_STATUS]: status code. This is also the return value, | |
147 whether or not Info is present. | |
148 | |
149 UMFPACK_OK | |
150 | |
151 The determinant was successfully found. | |
152 | |
153 UMFPACK_ERROR_out_of_memory | |
154 | |
155 Insufficient memory to solve the linear system. | |
156 | |
157 UMFPACK_ERROR_argument_missing | |
158 | |
159 Mx is missing (NULL). | |
160 | |
161 UMFPACK_ERROR_invalid_Numeric_object | |
162 | |
163 The Numeric object is not valid. | |
164 | |
165 UMFPACK_ERROR_invalid_system | |
166 | |
167 The matrix is rectangular. Only square systems can be | |
168 handled. | |
169 | |
170 UMFPACK_WARNING_singluar_matrix | |
171 | |
172 The determinant is zero or NaN. The matrix is singular. | |
173 | |
174 UMFPACK_WARNING_determinant_underflow | |
175 | |
176 When passing from mantissa/exponent form to the determinant | |
177 an underflow has or will occur. If the mantissa/exponent from | |
178 of obtaining the determinant is used, the underflow will occur | |
179 in the user program. If the single argument method of | |
180 obtaining the determinant is used, the underflow has already | |
181 occurred. | |
182 | |
183 UMFPACK_WARNING_determinant_overflow | |
184 | |
185 When passing from mantissa/exponent form to the determinant | |
186 an overflow has or will occur. If the mantissa/exponent from | |
187 of obtaining the determinant is used, the overflow will occur | |
188 in the user program. If the single argument method of | |
189 obtaining the determinant is used, the overflow has already | |
190 occurred. | |
191 | |
192 */ |