IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2007, 4:49:44 PM (18 years ago)
Author:
Paul Price
Message:

LU decomp doesn't allow in-place processing.

File:
1 edited

Legend:

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

    r15823 r15824  
    2222 *  @author Andy Becker, University of Washington (SVD).
    2323 *
    24  *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
    25  *  @date $Date: 2007-12-14 02:46:45 $
     24 *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
     25 *  @date $Date: 2007-12-14 02:49:44 $
    2626 *
    2727 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    363363        return false;
    364364    }
    365     b = psMatrixLUSolve(b, lu, b, perm);
     365    psVector *ans = psMatrixLUSolve(NULL, lu, b, perm); // Answer
    366366    psFree(lu);
    367367    psFree(perm);
    368     if (!b) {
     368    if (!ans) {
    369369        psError(PS_ERR_UNKNOWN, false, "Unable to solve matrix equation.");
    370370        return false;
    371371    }
     372
     373    memcpy(b->data.U8, ans->data.U8, b->n * PSELEMTYPE_SIZEOF(ans->type.type));
     374    psFree(ans);
    372375
    373376    return true;
Note: See TracChangeset for help on using the changeset viewer.