IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 24, 2006, 1:43:16 PM (20 years ago)
Author:
drobbin
Message:

Changed psArray & psVector to zero 'n' upon allocation. Used to set vector->n = nalloc.

File:
1 edited

Legend:

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

    r6437 r6484  
    11/** @file psSpline.c
    22*
    3 *  @brief Contains basic spline allocation, deallocation, fitting, 
     3*  @brief Contains basic spline allocation, deallocation, fitting,
    44*         and evaluation routines.
    55*
    66*  This file contains the routines that allocate, free, and evaluate splines.
    77*
    8 *  @version $Revision: 1.136 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-02-17 00:56:48 $
     8*  @version $Revision: 1.137 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-02-24 23:43:15 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    239239            for (psS32 i = 0 ; i < x->n ; i++) {
    240240                spline->knots->data.F32[i] = x->data.F32[i];
     241                spline->knots->n++;
    241242            }
    242243        } else if (x->type.type == PS_TYPE_F64) {
    243244            for (psS32 i = 0 ; i < x->n ; i++) {
    244245                spline->knots->data.F32[i] = (psF32) x->data.F64[i];
     246                spline->knots->n++;
    245247            }
    246248        }
     
    248250        for (psS32 i = 0 ; i < y->n ; i++) {
    249251            spline->knots->data.F32[i] = (psF32) i;
     252            spline->knots->n++;
    250253        }
    251254    }
     
    412415        for (psS32 i=0;i<x->n;i++) {
    413416            tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
     417            tmpVector->n++;
    414418        }
    415419    } else if (x->type.type == PS_TYPE_F64) {
    416420        for (psS32 i=0;i<x->n;i++) {
    417421            tmpVector->data.F32[i] = psSpline1DEval(spline, (psF32) x->data.F64[i]);
     422            tmpVector->n++;
    418423        }
    419424    }
Note: See TracChangeset for help on using the changeset viewer.