Rev 1820 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
/* ========================================================================== *//* === UMFPACK_get_determinant ============================================== *//* ========================================================================== *//* -------------------------------------------------------------------------- *//* UMFPACK Version 4.5, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, *//* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. *//* web: http://www.cise.ufl.edu/research/sparse/umfpack *//* -------------------------------------------------------------------------- */int umfpack_di_get_determinant(double *Mx,double *Ex,void *NumericHandle,double User_Info [UMFPACK_INFO]) ;long umfpack_dl_get_determinant(double *Mx,double *Ex,void *NumericHandle,double User_Info [UMFPACK_INFO]) ;int umfpack_zi_get_determinant(double *Mx,double *Mz,double *Ex,void *NumericHandle,double User_Info [UMFPACK_INFO]) ;long umfpack_zl_get_determinant(double *Mx,double *Mz,double *Ex,void *NumericHandle,double User_Info [UMFPACK_INFO]) ;/*double int Syntax:#include "umfpack.h"void *Numeric ;int status ;double Mx, Ex, Info [UMFPACK_INFO] ;status = umfpack_di_get_determinant (&Mx, &Ex, Numeric, Info) ;double long Syntax:#include "umfpack.h"void *Numeric ;long status ;double Mx, Ex, Info [UMFPACK_INFO] ;status = umfpack_dl_get_determinant (&Mx, &Ex, Numeric, Info) ;complex int Syntax:#include "umfpack.h"void *Numeric ;int status ;double Mx, Mz, Ex, Info [UMFPACK_INFO] ;status = umfpack_zi_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ;complex int Syntax:#include "umfpack.h"void *Numeric ;long status ;double *Mx, *Mz, *Ex, Info [UMFPACK_INFO] ;status = umfpack_zl_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ;packed complex int Syntax:Same as above, except Mz is NULL.Purpose:Using the LU factors and the permutation vectors contained in the Numericobject, calculate the determinant of the matrix A.The value of the determinant can be returned in two forms, depending onwhether Ex is NULL or not. If Ex is NULL then the value of the determinantis returned on Mx and Mz for the real and imaginary parts. However, toavoid over- or underflows, the determinant can be split into a mantissaand exponent, and the parts returned separately, in which case Ex is notNULL. The actual determinant is then given bydouble det ;det = Mx * pow (10.0, Ex) ;for the double case, ordouble det [2] ;det [0] = Mx * pow (10.0, Ex) ; // real partdet [1] = Mz * pow (10.0, Ex) ; // imaginary partfor the complex case. Information on if the determinant will or hasover or under-flowed is given by Info [UMFPACK_STATUS].In the "packed complex" syntax, Mx [0] holds the real part and Mx [1]holds the imaginary part. Mz is not used (it is NULL).Returns:Returns UMFPACK_OK if sucessful. Returns UMFPACK_ERROR_out_of_memory ifinsufficient memory is available for the n_row integer workspace thatumfpack_*_get_determinant allocates to construct pivots from thepermutation vectors. Returns UMFPACK_ERROR_invalid_Numeric_object if theNumeric object provided as input is invalid. ReturnsUMFPACK_WARNING_singular_matrix if the determinant is zero. ReturnsUMFPACK_WARNING_determinant_underflow orUMFPACK_WARNING_determinant_overflow if the determinant has underflowedoverflowed (for the case when Ex is NULL), or will overflow if Ex is notNULL and det is computed (see above) in the user program.Arguments:double *Mx ; Output argument (array of size 1, or size 2 if Mz is NULL)double *Mz ; Output argument (optional)double *Ex ; Output argument (optional)The determinant returned in mantissa/exponent form, as discussed above.If Mz is NULL, then both the original and imaginary parts will bereturned in Mx. If Ex is NULL then the determinant is returned directlyin Mx and Mz (or Mx [0] and Mx [1] if Mz is NULL), rather than inmantissa/exponent form.void *Numeric ; Input argument, not modified.Numeric must point to a valid Numeric object, computed byumfpack_*_numeric.double Info [UMFPACK_INFO] ; Output argument.Contains information about the calculation of the determinant. If a(double *) NULL pointer is passed, then no statistics are returned inInfo (this is not an error condition). The following statistics arecomputed in umfpack_*_determinant:Info [UMFPACK_STATUS]: status code. This is also the return value,whether or not Info is present.UMFPACK_OKThe determinant was successfully found.UMFPACK_ERROR_out_of_memoryInsufficient memory to solve the linear system.UMFPACK_ERROR_argument_missingMx is missing (NULL).UMFPACK_ERROR_invalid_Numeric_objectThe Numeric object is not valid.UMFPACK_ERROR_invalid_systemThe matrix is rectangular. Only square systems can behandled.UMFPACK_WARNING_singluar_matrixThe determinant is zero or NaN. The matrix is singular.UMFPACK_WARNING_determinant_underflowWhen passing from mantissa/exponent form to the determinantan underflow has or will occur. If the mantissa/exponent fromof obtaining the determinant is used, the underflow will occurin the user program. If the single argument method ofobtaining the determinant is used, the underflow has alreadyoccurred.UMFPACK_WARNING_determinant_overflowWhen passing from mantissa/exponent form to the determinantan overflow has or will occur. If the mantissa/exponent fromof obtaining the determinant is used, the overflow will occurin the user program. If the single argument method ofobtaining the determinant is used, the overflow has alreadyoccurred.*/