IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 1, 2007, 11:01:33 AM (19 years ago)
Author:
magnier
Message:

fixed a surprising bug triggered with non-square matrices

File:
1 edited

Legend:

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

    r10848 r10863  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-12-29 04:38:42 $
     12 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2007-01-01 21:01:33 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    126126    psF64 ySum = 1.0;
    127127
     128    // note that we are using the X and Y elements of the image reversed to be
     129    // consistent with the other BuildSumsND functions in terms of the definition
     130    // of the sums array
    128131    nXsum = 2*nXterm;
    129132    nYsum = 2*nYterm;
    130133    if (sums == NULL) {
    131         sums = psImageAlloc(nXsum, nYsum, PS_TYPE_F64);
    132     }
    133     if ((nXsum != sums->numCols) || (nYsum != sums->numRows)) {
     134        sums = psImageAlloc(nYsum, nXsum, PS_TYPE_F64);
     135    }
     136    if ((nYsum != sums->numCols) || (nXsum != sums->numRows)) {
    134137        psFree (sums);
    135         sums = psImageAlloc(nXsum, nYsum, PS_TYPE_F64);
     138        sums = psImageAlloc(nYsum, nXsum, PS_TYPE_F64);
    136139    }
    137140
Note: See TracChangeset for help on using the changeset viewer.