Changeset 3096 for trunk/psLib/src/dataManip/psMinimize.c
- Timestamp:
- Jan 26, 2005, 10:41:04 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataManip/psMinimize.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psMinimize.c
r3027 r3096 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.10 1$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-01- 17 23:25:09$11 * @version $Revision: 1.102 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-01-26 20:41:04 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 171 171 PS_PTR_CHECK_NULL(spline, NAN); 172 172 PS_INT_CHECK_NON_NEGATIVE(spline->n, NAN); 173 PS_ PTR_CHECK_NULL(spline->domains, NAN);173 PS_VECTOR_CHECK_NULL(spline->domains, NAN); 174 174 PS_PTR_CHECK_NULL(spline->p_psDeriv2, NAN); 175 175 PS_VECTOR_CHECK_NULL(x, NAN); … … 189 189 190 190 n = spline->n; 191 klo = p_psVectorBinDisect32(spline-> domains, (spline->n)+1, X);191 klo = p_psVectorBinDisect32(spline->knots->data.F32, (spline->n)+1, X); 192 192 if (klo < 0) { 193 193 psLogMsg(__func__, PS_LOG_WARN, … … 196 196 } 197 197 khi = klo + 1; 198 H = (spline->domains)[khi] - (spline->domains)[klo];199 A = ( (spline->domains)[khi] - X) / H;200 B = (X - (spline->domains)[klo]) / H;198 H = spline->knots->data.F32[khi] - spline->knots->data.F32[klo]; 199 A = (spline->knots->data.F32[khi] - X) / H; 200 B = (X - spline->knots->data.F32[klo]) / H; 201 201 C = ((A*A*A)-A) * (H*H/6.0); 202 202 D = ((B*B*B)-B) * (H*H/6.0); … … 236 236 237 237 XXX: Is the x argument redundant? What do we do if the x argument is 238 supplied, but does not equal the domains specified in mySpline?238 supplied, but does not equal the knots specified in mySpline? 239 239 240 240 XXX: can psSpline be NULL? … … 314 314 for (i=0;i<mySpline->n;i++) { 315 315 slope = (y32->data.F32[i+1] - y32->data.F32[i]) / 316 (mySpline-> domains[i+1] - mySpline->domains[i]);316 (mySpline->knots->data.F32[i+1] - mySpline->knots->data.F32[i]); 317 317 (mySpline->spline[i])->coeff[0] = y32->data.F32[i] - 318 (slope * mySpline-> domains[i]);318 (slope * mySpline->knots->data.F32[i]); 319 319 320 320 (mySpline->spline[i])->coeff[1] = slope;
Note:
See TracChangeset
for help on using the changeset viewer.
