IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2004, 1:31:44 PM (22 years ago)
Author:
gusciora
Message:

Parameter checking for the psCOord.c file.

File:
1 edited

Legend:

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

    r2218 r2221  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-10-27 21:25:52 $
     9 *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-10-27 23:31:43 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232#include "psTrace.h"
    3333#include "psError.h"
    34 #include "psAbort.h"
    3534#include "psLogMsg.h"
    3635#include "psFunctions.h"
     
    145144 Gaussian distribution as well.
    146145 
    147  NOTE: XXX: There is no way to seed the random generator.
     146XXX: There is no way to seed the random generator.
    148147 *****************************************************************************/
    149148psVector* psGaussianDev(float mean, float sigma, psS32 Npts)
     
    167166    }
    168167
    169     // NOTE: Should I free r as well?
     168    // XXX: Should I free r, T as well?  This is a memory leak.
    170169    return(gauss);
    171170}
     
    426425    }
    427426
    428 
    429     if (NULL == myPoly) {
    430         psAbort(__func__, "psPolynomial1DEval(): myPoly is NULL\n");
    431     }
    432 
    433     // NOTE: Do we want to flag this case?
    434     if (myPoly->n == 0) {
    435         return(1.0);
    436     }
    437 
    438     if (NULL == myPoly->coeff) {
    439         psAbort(__func__, "psPolynomial1DEval(): myPoly->coeff is NULL\n");
    440     }
    441 
    442427    for (loop_x = 0; loop_x < myPoly->n; loop_x++) {
    443428        if (myPoly->mask[loop_x] == 0) {
     
    508493        return(p_psChebPolynomial1DEval(x, myPoly));
    509494    } else {
    510         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     495        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    511496    }
    512497    return(0.0);
     
    604589        return(p_psChebPolynomial2DEval(x, y, myPoly));
    605590    } else {
    606         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     591        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    607592    }
    608593    return(0.0);
     
    727712        return(p_psChebPolynomial3DEval(x, y, z, myPoly));
    728713    } else {
    729         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     714        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    730715    }
    731716    return(0.0);
     
    876861        return(p_psChebPolynomial4DEval(w,x,y,z, myPoly));
    877862    } else {
    878         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     863        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    879864    }
    880865    return(0.0);
     
    11851170    double xSum = 1.0;
    11861171
    1187     // NOTE: Do we want to flag this case?
    1188     if (myPoly->n == 0) {
    1189         return(1.0);
    1190     }
    1191 
    11921172    for (loop_x = 0; loop_x < myPoly->n; loop_x++) {
    11931173        if (myPoly->mask[loop_x] == 0) {
     
    12361216        return(p_psDChebPolynomial1DEval(x, myPoly));
    12371217    } else {
    1238         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     1218        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    12391219    }
    12401220    return(0.0);
     
    13301310        return(p_psDChebPolynomial2DEval(x, y, myPoly));
    13311311    } else {
    1332         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     1312        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    13331313    }
    13341314    return(0.0);
     
    14521432        return(p_psDChebPolynomial3DEval(x, y, z, myPoly));
    14531433    } else {
    1454         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     1434        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    14551435    }
    14561436    return(0.0);
     
    16031583        return(p_psDChebPolynomial4DEval(w,x,y,z, myPoly));
    16041584    } else {
    1605         psAbort(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
     1585        psError(__func__, "Unknown polynomial type 0x%x\n", myPoly->type);
    16061586    }
    16071587    return(0.0);
Note: See TracChangeset for help on using the changeset viewer.