IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 6, 2009, 2:22:14 PM (17 years ago)
Author:
eugene
Message:

rename psMatrixGJSolveF32 to psMatrixGJSolve; better handling of failure in psMatrixGJSolve

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageMapFit.c

    r23989 r24091  
    308308# endif
    309309
    310     if (!psMatrixGJSolveF32(A, B)) {
    311         psAbort ("failed on linear equations");
     310    if (!psMatrixGJSolve(A, B)) {
    312311        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.  Returning NULL.\n");
    313312        psFree (A);
     
    577576    }
    578577
    579     if (!psMatrixGJSolveF32(A, B)) {
    580         psAbort ("failed on linear equations");
    581         psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.  Returning NULL.\n");
     578    if (!psMatrixGJSolve(A, B)) {
     579        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.\n");
    582580        psFree (A);
    583581        psFree (B);
     582        psFree (Empty);
    584583        return false;
    585584    }
     
    725724    }
    726725
    727     if (!psMatrixGJSolveF32(A, B)) {
    728         psAbort ("failed on linear equations");
    729         psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.  Returning NULL.\n");
     726    if (!psMatrixGJSolve(A, B)) {
     727        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations..\n");
    730728        psFree (A);
    731729        psFree (B);
     730        psFree (Empty);
    732731        return false;
    733732    }
     
    742741
    743742    for (int m = 0; m < Nx; m++) {
    744         int I = m; // XXX I'm not entirely sure about this; it wasn't set for this scope --- PAP.
    745         map->map->data.F32[0][m] = B->data.F32[I];
    746         map->error->data.F32[0][m] = sqrt(A->data.F32[I][I]);
     743        map->map->data.F32[0][m] = B->data.F32[m];
     744        map->error->data.F32[0][m] = sqrt(A->data.F32[m][m]);
    747745    }
    748746
Note: See TracChangeset for help on using the changeset viewer.