IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 12:55:05 PM (20 years ago)
Author:
Paul Price
Message:

Following today's meeting, we agreed that psVectorAlloc (and therefore
psArrayAlloc also) shall set the number of elements in use to equal the
number of elements allocated. We introduce new functions,
psVectorAllocEmpty and psArrayAllocEmpty, that allocate a vector and set
the length to zero.

File:
1 edited

Legend:

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

    r9540 r9730  
    66*  This file contains the routines that allocate, free, and evaluate splines.
    77*
    8 *  @version $Revision: 1.155 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-10-13 22:04:58 $
     8*  @version $Revision: 1.156 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-10-24 22:52:56 $
    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++;
    242241            }
    243242        } else if (x->type.type == PS_TYPE_F64) {
    244243            for (psS32 i = 0 ; i < x->n ; i++) {
    245244                spline->knots->data.F32[i] = (psF32) x->data.F64[i];
    246                 spline->knots->n++;
    247245            }
    248246        }
     
    250248        for (psS32 i = 0 ; i < y->n ; i++) {
    251249            spline->knots->data.F32[i] = (psF32) i;
    252             spline->knots->n++;
    253250        }
    254251    }
     
    415412        for (psS32 i=0;i<x->n;i++) {
    416413            tmpVector->data.F32[i] = psSpline1DEval(spline, x->data.F32[i]);
    417             tmpVector->n++;
    418414        }
    419415    } else if (x->type.type == PS_TYPE_F64) {
    420416        for (psS32 i=0;i<x->n;i++) {
    421417            tmpVector->data.F32[i] = psSpline1DEval(spline, (psF32) x->data.F64[i]);
    422             tmpVector->n++;
    423418        }
    424419    }
Note: See TracChangeset for help on using the changeset viewer.