IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 7, 2008, 1:10:46 PM (18 years ago)
Author:
eugene
Message:

this was mis-calculating the determinant (mis-using gsl_linalg_LU_lndet); cleaned up asserts for psMatrixTranspose

File:
1 edited

Legend:

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

    r17447 r17564  
    2222 *  @author Andy Becker, University of Washington (SVD).
    2323 *
    24  *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
    25  *  @date $Date: 2008-04-17 23:43:02 $
     24 *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
     25 *  @date $Date: 2008-05-07 23:10:46 $
    2626 *
    2727 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    415415    gsl_linalg_LU_invert(lu, perm, inv);
    416416    if (determinant) {
    417         *determinant = (float)gsl_linalg_LU_lndet(lu);
     417      // XXX this is getting the wrong value: is it the wrong calculation?
     418      // it disagrees with the results of
     419      // det = (psF32)gsl_linalg_LU_det(lu, signum);
     420      // used in psMatrixDeterminatn
     421      // *determinant = (float)gsl_linalg_LU_lndet(lu);
     422      *determinant = (psF32)gsl_linalg_LU_det(lu, signum);
    418423    }
    419424
     
    526531{
    527532    // Error checks
    528     #define TRANSPOSE_CLEANUP { return NULL; }
    529     PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, TRANSPOSE_CLEANUP);
    530     PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, TRANSPOSE_CLEANUP);
    531     PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, TRANSPOSE_CLEANUP);
    532     PS_CHECK_POINTERS(in, out, TRANSPOSE_CLEANUP);
     533    PS_ASSERT_IMAGE_NON_NULL(in, NULL);
     534    PS_ASSERT_IMAGE_NON_EMPTY(in, NULL);
     535    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, return NULL);
     536    PS_ASSERT(in != out, NULL);
    533537
    534538    int numCols = in->numRows, numRows = in->numCols; // Size of transposed image
Note: See TracChangeset for help on using the changeset viewer.