IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2006, 10:47:25 AM (20 years ago)
Author:
gusciora
Message:

....

File:
1 edited

Legend:

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

    r6484 r6768  
    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.137 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-02-24 23:43:15 $
     8*  @version $Revision: 1.138 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-04-04 20:47:25 $
    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    }
     
    369366
    370367    psS32 n = spline->n;
    371     if ((x < spline->knots->data.F32[0]) || (x > spline->knots->data.F32[n-1])) {
     368    if ((x < spline->knots->data.F32[0]) || (x > spline->knots->data.F32[spline->knots->n-1])) {
    372369        // If x is outside the range of spline->knots, generate a warning
    373370        // message, then return the left, or right, endpoint.
     
    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.