IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15767


Ignore:
Timestamp:
Dec 7, 2007, 3:31:58 PM (18 years ago)
Author:
Paul Price
Message:

Determinant should be optional in psMatrixDeterminant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psMatrix.c

    r12293 r15767  
    2222 *  @author Andy Becker, University of Washington (SVD).
    2323 *
    24  *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
    25  *  @date $Date: 2007-03-07 21:12:13 $
     24 *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
     25 *  @date $Date: 2007-12-08 01:31:58 $
    2626 *
    2727 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    530530    #define INVERT_CLEANUP { psFree(out); return NULL; }
    531531    // Error checks
    532     PS_ASSERT_GENERAL_PTR_NON_NULL(determinant, INVERT_CLEANUP);
    533532    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, INVERT_CLEANUP);
    534533    PS_CHECK_POINTERS(in, out, INVERT_CLEANUP);
     
    554553    gsl_linalg_LU_decomp(lu, perm, &signum);
    555554    gsl_linalg_LU_invert(lu, perm, inv);
    556     *determinant = (float)gsl_linalg_LU_det(lu, signum);
     555    if (determinant) {
     556        *determinant = (float)gsl_linalg_LU_det(lu, signum);
     557    }
    557558
    558559    // Copy GSL matrix data to psImage data
     
    593594
    594595    // Calculate determinant
    595     //    det = psAlloc(sizeof(psF32));
    596596    gsl_linalg_LU_decomp(lu, perm, &signum);
    597597    det = (psF32)gsl_linalg_LU_det(lu, signum);
Note: See TracChangeset for help on using the changeset viewer.