Index: /trunk/psLib/src/dataManip/psMinimize.c
===================================================================
--- /trunk/psLib/src/dataManip/psMinimize.c	(revision 1847)
+++ /trunk/psLib/src/dataManip/psMinimize.c	(revision 1848)
@@ -9,6 +9,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-22 02:42:20 $
+ *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-22 02:42:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -17,5 +17,4 @@
  *
  */
-
 /*****************************************************************************/
 /* INCLUDE FILES                                                             */
Index: /trunk/psLib/src/math/psMinimize.c
===================================================================
--- /trunk/psLib/src/math/psMinimize.c	(revision 1847)
+++ /trunk/psLib/src/math/psMinimize.c	(revision 1848)
@@ -9,6 +9,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-22 02:42:20 $
+ *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-22 02:42:49 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -17,5 +17,4 @@
  *
  */
-
 /*****************************************************************************/
 /* INCLUDE FILES                                                             */
Index: /trunk/psLib/test/dataManip/Makefile
===================================================================
--- /trunk/psLib/test/dataManip/Makefile	(revision 1847)
+++ /trunk/psLib/test/dataManip/Makefile	(revision 1848)
@@ -3,6 +3,6 @@
 ##  Makefile:   test/sysUtils
 ##
-##  $Revision: 1.43 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-09-22 02:42:20 $
+##  $Revision: 1.44 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-09-22 02:42:49 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,5 +18,4 @@
 CFLAGS := -I../../include $(CFLAGS)
 LDFLAGS := -L../../lib -lpslib -lpstest $(LDFLAGS)
-
 TARGET = \
 tst_psFunc00 \
Index: /trunk/psLib/test/dataManip/tst_psFunc07.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psFunc07.c	(revision 1848)
+++ /trunk/psLib/test/dataManip/tst_psFunc07.c	(revision 1848)
@@ -0,0 +1,91 @@
+/*****************************************************************************
+    This routine must ensure that the psSpline1DEval() function works
+    properly.  It creates a spline with psSpline1DAlloc(), creates a set of
+    data values, sets the spline polynomials with psSpline1DGen(), then
+    calls psSpline1DEval() on new data values and ensures that the results
+    are correct.
+ 
+    XXX: figure out the memory deallocator
+ *****************************************************************************/
+#include <stdio.h>
+#include <math.h>
+#include "pslib.h"
+#include "psTest.h"
+#include "psMemory.h"
+#include "psFunctions.h"
+
+#define N 8
+#define A 3.0
+#define B -4.0
+#define C -5.0
+#define D 6.0
+
+float myFunc(float x)
+{
+    return(A + x * (B + x * (C + x * (D))));
+}
+
+int main()
+{
+    int testStatus = true;
+    int memLeaks=0;
+    int i;
+    //    int  currentId = psMemGetId();
+    psSpline1D *tmpSpline;
+    psVector *data;
+    psVector *x;
+    psVector *y;
+
+    psTraceSetLevel(".", 0);
+    /****************************************************************************/
+    /****************************************************************************/
+    testStatus = true;
+    printPositiveTestHeader(stdout,
+                            "psFunction functions",
+                            "psSpline1DAlloc()");
+    data = psVectorAlloc(N+1, PS_TYPE_F32);
+    x = psVectorAlloc(N+1, PS_TYPE_F32);
+    y = psVectorAlloc(N+1, PS_TYPE_F32);
+    tmpSpline = psSpline1DAlloc(N, 3, 1.0, 10.0);
+
+    for (i=0;i<N+1;i++) {
+        data->data.F32[i] = tmpSpline->domains[i];
+        x->data.F32[i] = tmpSpline->domains[i];
+        y->data.F32[i] = tmpSpline->domains[i];
+        y->data.F32[i] = myFunc(x->data.F32[i]);
+        printf("HMMM: (x, y) is (%f, %f)\n", x->data.F32[i], y->data.F32[i]);
+    }
+
+    //    psSpline1DGen(tmpSpline, data);
+    psVectorFitSpline1D(tmpSpline, x, y, NULL);
+
+    for (i=0;i<N+1;i++) {
+        //        x->data.F32[i] = 0.5 + (float) i+1;
+    }
+
+    y = psSpline1DEvalVector(x, tmpSpline);
+
+    for (i=0;i<N+1;i++) {
+        if (fabs(x->data.F32[i]-y->data.F32[i]) > FLT_EPSILON) {
+            printf("ERROR: f(%f) is %f.  Should be %f\n", x->data.F32[i], y->data.F32[i], myFunc(x->data.F32[i]));
+            testStatus = true;
+        } else {
+            printf("COOL: f(%f) is %f\n", x->data.F32[i], y->data.F32[i]);
+
+        }
+    }
+
+    psFree(tmpSpline);
+    psMemCheckCorruption(1);
+    //    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
+    if (0 != memLeaks) {
+        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
+    }
+
+    printFooter(stdout,
+                "psFunctions functions",
+                "psSpline1DAlloc()",
+                testStatus);
+
+    return (!testStatus);
+}
