IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4567


Ignore:
Timestamp:
Jul 15, 2005, 1:19:41 PM (21 years ago)
Author:
gusciora
Message:

/

File:
1 edited

Legend:

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

    r4540 r4567  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-07-12 19:12:01 $
     9 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-07-15 23:19:41 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    18731873    PS_ASSERT_INT_NONNEGATIVE(order, NULL);
    18741874
    1875     psSpline1D *tmp = NULL;
     1875    psSpline1D *tmpSpline = NULL;
    18761876    unsigned int i;
    18771877    unsigned int numSplines;
    18781878
    1879     tmp = (psSpline1D *) psAlloc(sizeof(psSpline1D));
     1879    tmpSpline = (psSpline1D *) psAlloc(sizeof(psSpline1D));
    18801880
    18811881    numSplines = bounds->n - 1;
    1882     tmp->n = numSplines;
    1883 
    1884     tmp->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *));
     1882    tmpSpline->n = numSplines;
     1883
     1884    tmpSpline->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *));
    18851885    for (i=0;i<numSplines;i++) {
    1886         (tmp->spline)[i] = psPolynomial1DAlloc(order+1, PS_POLYNOMIAL_ORD);
     1886        (tmpSpline->spline)[i] = psPolynomial1DAlloc(order+1, PS_POLYNOMIAL_ORD);
    18871887    }
    18881888
    18891889    // This should be set by the psVectorFitSpline1D()
    1890     tmp->p_psDeriv2 = NULL;
    1891 
    1892     tmp->knots = psVectorAlloc(bounds->n, PS_TYPE_F32);
     1890    tmpSpline->p_psDeriv2 = NULL;
     1891
     1892    tmpSpline->knots = psVectorAlloc(bounds->n, PS_TYPE_F32);
    18931893
    18941894    for (i=0;i<bounds->n;i++) {
    1895         tmp->knots->data.F32[i] = bounds->data.F32[i];
     1895        tmpSpline->knots->data.F32[i] = bounds->data.F32[i];
    18961896        if (i<(bounds->n-1)) {
    18971897            if (FLT_EPSILON >= fabs(bounds->data.F32[i+1]-bounds->data.F32[i])) {
     
    19011901    }
    19021902
    1903     psMemSetDeallocator(tmp,(psFreeFunc)spline1DFree);
    1904     return(tmp);
     1903    psMemSetDeallocator(tmpSpline,(psFreeFunc)spline1DFree);
     1904    return(tmpSpline);
    19051905}
    19061906
Note: See TracChangeset for help on using the changeset viewer.