Index: trunk/psLib/.cvsignore
===================================================================
--- trunk/psLib/.cvsignore	(revision 6334)
+++ trunk/psLib/.cvsignore	(revision 6335)
@@ -28,2 +28,5 @@
 missing
 pslib.kdevses
+.deps
+.libs
+psTableParse
Index: trunk/psLib/test/imageops/.cvsignore
===================================================================
--- trunk/psLib/test/imageops/.cvsignore	(revision 6334)
+++ trunk/psLib/test/imageops/.cvsignore	(revision 6335)
@@ -16,3 +16,3 @@
 sOut.fits
 tst_psImageMaskOps
-
+tst_psImageSmooth
Index: trunk/psLib/test/math/.cvsignore
===================================================================
--- trunk/psLib/test/math/.cvsignore	(revision 6334)
+++ trunk/psLib/test/math/.cvsignore	(revision 6335)
@@ -4,15 +4,5 @@
 Makefile
 Makefile.in
-tst_psFunc00
 tst_psFunc01
-tst_psFunc02
-tst_psFunc03
-tst_psFunc04
-tst_psFunc05
-tst_psFunc07
-tst_psFunc08
-tst_psFunc09
-tst_psFunc10
-tst_psFunc11
 tst_psHist00
 tst_psHist01
@@ -30,6 +20,4 @@
 tst_psMatrixVectorArithmetic03
 tst_psMatrixVectorArithmetic04
-tst_psMinimize05
-tst_psMinimize06
 tst_psRandom
 tst_psStats00
Index: trunk/psLib/test/math/tst_psFunc08.c
===================================================================
--- trunk/psLib/test/math/tst_psFunc08.c	(revision 6334)
+++ 	(revision )
@@ -1,195 +1,0 @@
-/** tst_psFunc08.c
-*
-*  This test driver will exercise the psPolynomialXDEval functions for both
-*  ORD and CHEB type polynomials.
-*
-*  @version  $Revision: 1.6 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2006-01-26 21:10:22 $
-*
-*  XXX: Probably should test single- and multi-dimensional polynomials in
-*  which one diminsion is constant (n == 1).
-*
-*  XXX: define ORDERS, not TERMS
-* 
-*
-* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
-*
-***************************************************************************/
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define  TERMS        4
-#define  TESTPOINTS   5
-#define  ERROR_TOL    0.001
-
-static psS32 testPoly1DEval(void);
-static psS32 testPoly1DEvalVector(void);
-
-testDescription tests[] = {
-                              {testPoly1DEval,000,"psPolynomial1DEval",0,false},
-                              {testPoly1DEvalVector,000,"psPolynomial1DEvalVector",0,false},
-                              {NULL}
-                          };
-
-psF32 poly1DCoeff[TERMS]        = { -4.3, 2.3, -3.2, 1.9};
-psF64 Dpoly1DCoeff[TERMS]        = { -4.3, 2.3, -3.2, 1.9};
-psF32 poly1DMask[TERMS]         = {    0,   0,    1,   0  };
-
-psF32 poly1DXValue[TESTPOINTS]   = { 2.550000,    -9.8000,   0.00134,   -12.2500,   0.000};
-psF64 Dpoly1DXValue[TESTPOINTS]  = { 2.550000,    -9.8000,   0.00134,   -12.2500,   0.000};
-psF32 poly1DXResult[TESTPOINTS]  = {33.069613, -1815.1048, -4.296918, -3525.1797, -4.3000};
-psF64 Dpoly1DXResult[TESTPOINTS] = {33.069613, -1815.1048, -4.296918, -3525.1797, -4.3000};
-
-psF32 poly1DXChebValue[TESTPOINTS]   = { -0.99,    -0.33,     0.125,    0.564,    0.875};
-psF64 Dpoly1DXChebValue[TESTPOINTS]  = { -0.99,    -0.33,     0.125,    0.564,    0.875};
-psF32 poly1DXChebResult[TESTPOINTS]  = { -1.401196, 1.016252, 0.257813, 0.089625, 1.429688};
-psF64 Dpoly1DXChebResult[TESTPOINTS] = { -1.401196, 1.016252, 0.257813, 0.089625, 1.429688};
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-
-    return !runTestSuite(stderr,"psPolynomialXDEval", tests, argc, argv);
-}
-
-// This test will verify operation of 1D polynomial evaluation
-psS32 testPoly1DEval(void)
-{
-    psF64  result;
-    psF64  resultCheb;
-
-    // Allocate polynomial structure
-    psPolynomial1D*  polyOrd = psPolynomial1DAlloc(PS_POLYNOMIAL_ORD, TERMS-1);
-    psPolynomial1D*  polyCheb = psPolynomial1DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1);
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        polyOrd->coeff[i] = poly1DCoeff[i];
-        polyOrd->mask[i]  = poly1DMask[i];
-        polyCheb->coeff[i] = 1.0;
-        polyCheb->mask[i]  = poly1DMask[i];
-    }
-    // Evaluate test points and verify results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        result = psPolynomial1DEval(polyOrd,poly1DXValue[i]);
-        if(fabs(poly1DXResult[i]-result) > ERROR_TOL ) {
-            psError(PS_ERR_UNKNOWN,true,"Evaluated value %g not as expected %g",
-                    result, poly1DXResult[i]);
-            return i;
-        }
-        resultCheb = psPolynomial1DEval(polyCheb,poly1DXChebValue[i]);
-        if(fabs(poly1DXChebResult[i]-resultCheb) > ERROR_TOL ) {
-            psError(PS_ERR_UNKNOWN,true,"Evaluated Chebyshev value %lg not as expected %lg",
-                    resultCheb, poly1DXChebResult[i]);
-            return 5*i;
-        }
-    }
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    // Allocate polynomial with invalid type
-    polyOrd = psPolynomial1DAlloc(99, TERMS-1);
-    // Attempt to evaluation invalid polynomial type
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message invalid type");
-    result = psPolynomial1DEval(polyOrd,0.0);
-    if ( !isnan(result) ) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return NAN for invalid polynomial type");
-        return 20;
-    }
-    psFree(polyOrd);
-
-    return 0;
-}
-
-
-psS32 testPoly1DEvalVector(void)
-{
-    // Allocate polynomial
-    psPolynomial1D* polyOrd = psPolynomial1DAlloc(PS_POLYNOMIAL_ORD, TERMS-1);
-    psPolynomial1D* polyCheb = psPolynomial1DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1);
-
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        polyOrd->coeff[i] = poly1DCoeff[i];
-        polyOrd->mask[i]  = poly1DMask[i];
-        polyCheb->coeff[i] = 1.0;
-        polyCheb->mask[i]  = poly1DMask[i];
-    }
-
-    // Create input vectors
-    psVector* inputOrd = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputCheb = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        inputOrd->data.F64[i] = poly1DXValue[i];
-        inputCheb->data.F64[i] = poly1DXChebValue[i];
-    }
-
-    // Evaluate the vectors
-    psVector* outputOrd = psPolynomial1DEvalVector(polyOrd, inputOrd);
-    if(outputOrd == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Unexpected return of NULL.");
-        return 1;
-    }
-    if(outputOrd->type.type != PS_TYPE_F64) {
-        psError(PS_ERR_UNKNOWN,true,"Output vector of type %d expected %d",
-                outputOrd->type.type, PS_TYPE_F64);
-        return 2;
-    }
-    psVector* outputCheb = psPolynomial1DEvalVector(polyCheb, inputCheb);
-    if(outputCheb == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Unexpected return of NULL.");
-        return 1;
-    }
-    if(outputCheb->type.type != PS_TYPE_F64) {
-        psError(PS_ERR_UNKNOWN,true,"Output vector of type %d expected %d",
-                outputCheb->type.type, PS_TYPE_F64);
-        return 2;
-    }
-
-    // Verify the results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        if(fabs(poly1DXResult[i]-outputOrd->data.F64[i]) > ERROR_TOL) {
-            psError(PS_ERR_UNKNOWN,true,"Result[%d] %lg not equal to expected %lg",
-                    i, outputOrd->data.F64[i], poly1DXResult[i]);
-            return i*5;
-        }
-        if(fabs(poly1DXChebResult[i]-outputCheb->data.F64[i]) > ERROR_TOL) {
-            psError(PS_ERR_UNKNOWN,true,"ResultCheb[%d] %lg not equal to expected %lg",
-                    i, outputCheb->data.F64[i], poly1DXChebResult[i]);
-            return i*10;
-        }
-    }
-
-    // Attempt to invoke function with null polynomial
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL polynomial");
-    if(psPolynomial1DEvalVector(NULL, inputOrd) != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Return of NULL expected for NULL polynomial");
-        return 60;
-    }
-
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial1DEvalVector(polyOrd,NULL) != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Return of NULL expected for NULL input vector");
-        return 61;
-    }
-
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrd->type.type = PS_TYPE_U8;
-    if(psPolynomial1DEvalVector(polyOrd,inputOrd) != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Return NULL expected for non-F64 input vector");
-        return 62;
-    }
-    inputOrd->type.type = PS_TYPE_F64;
-
-    psFree(inputOrd);
-    psFree(inputCheb);
-    psFree(outputOrd);
-    psFree(outputCheb);
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    return 0;
-}
Index: trunk/psLib/test/math/tst_psFunc09.c
===================================================================
--- trunk/psLib/test/math/tst_psFunc09.c	(revision 6334)
+++ 	(revision )
@@ -1,243 +1,0 @@
-/** tst_psFunc09.c
-*
-*  This test driver will exercise the psPolynomialXDEval functions for both
-*  ORD and CHEB type polynomials.
-*
-*  @version  $Revision: 1.6 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2006-01-26 21:10:22 $
-*
-* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
-*
-***************************************************************************/
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define  TERMS        4
-#define  TESTPOINTS   5
-#define  ERROR_TOL    0.001
-
-static psS32 testPoly2DEval(void);
-static psS32 testPoly2DEvalVector(void);
-
-testDescription tests[] = {
-                              {testPoly2DEval,583,"psPolynomial2DEval",true,false},
-                              {testPoly2DEvalVector,000,"psPolynomial2DEvalVector",true,false},
-                              {NULL}
-                          };
-
-psF32 poly2DCoeff[TERMS][TERMS]   = {  { -4.3,  2.3, -3.2,  1.9},
-                                       {  1.2,  0.7, -0.3,  1.3},
-                                       {  0.4, -2.9,  0.8, -3.1},
-                                       { -1.1,  2.1,  1.9,  0.6}
-                                    };
-psF64 Dpoly2DCoeff[TERMS][TERMS]  = {  { -4.3,  2.3, -3.2,  1.9},
-                                       {  1.2,  0.7, -0.3,  1.3},
-                                       {  0.4, -2.9,  0.8, -3.1},
-                                       { -1.1,  2.1,  1.9,  0.6}
-                                    };
-psF32 poly2DMask[TERMS][TERMS]    = {  {  0,    0,    0,    1},
-                                       {  0,    0,    1,    0},
-                                       {  1,    0,    0,    0},
-                                       {  0,    0,    0,    1}
-                                    };
-
-psF32 poly2DXYValue[TESTPOINTS][2] = {  {  1.40,  0.55},
-                                        { -0.55,  1.40},
-                                        {  0.00,  2.34},
-                                        { -0.88,  0.00},
-                                        {  3.45, -0.78}
-                                     };
-psF32 Dpoly2DXYValue[TESTPOINTS][2] = {  {  1.40,  0.55},
-                                      { -0.55,  1.40},
-                                      {  0.00,  2.34},
-                                      { -0.88,  0.00},
-                                      {  3.45, -0.78}
-                                      };
-psF32 poly2DResult[TESTPOINTS] = {  -3.415938, -14.765687, -16.43992, -4.606381, -22.650702 };
-psF64 Dpoly2DResult[TESTPOINTS] = {  -3.415938, -14.765687, -16.43992, -4.606381, -22.650702 };
-
-psF32 poly2DXYChebValue[TESTPOINTS][2] = {  {  0.500,  0.500},
-        {  0.000,  0.250},
-        { -0.250,  0.000},
-        {  0.990,  0.150},
-        {  0.333, -0.666}
-                                         };
-psF32 Dpoly2DXYChebValue[TESTPOINTS][2] = {  {  0.500,  0.500},
-        {  0.000,  0.250},
-        { -0.250,  0.000},
-        {  0.990,  0.150},
-        {  0.333, -0.666}
-                                          };
-psF32 poly2DChebResult[TESTPOINTS] = {  0.750000, 1.687500, 0.625000, -0.113040, 0.386786 };
-psF32 Dpoly2DChebResult[TESTPOINTS] = {  0.750000, 1.687500, 0.625000, -0.113040, 0.386786 };
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-
-    return !runTestSuite(stderr,"psPolynomialXDEval", tests, argc, argv);
-}
-
-// This test will verify operation of 1D polynomial evaluation
-psS32 testPoly2DEval(void)
-{
-    psF64  result;
-    psF64  resultCheb;
-    psBool testStatus = true;
-
-    // Allocate polynomial structure
-    psPolynomial2D*  polyOrd = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, TERMS-1, TERMS-1);
-    psPolynomial2D*  polyCheb = psPolynomial2DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1, TERMS-1);
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        for(psS32 j = 0; j < TERMS; j++) {
-            polyOrd->coeff[i][j] = poly2DCoeff[i][j];
-            polyOrd->mask[i][j]  = poly2DMask[i][j];
-            polyCheb->coeff[i][j] = 1.0;
-            polyCheb->mask[i][j]  = poly2DMask[i][j];
-        }
-    }
-    // Evaluate test points and verify results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        result = psPolynomial2DEval(polyOrd,Dpoly2DXYValue[i][0],Dpoly2DXYValue[i][1]);
-        if(fabs(Dpoly2DResult[i]-result) > ERROR_TOL ) {
-            printf("TEST ERROR: Evaluated value %f, should be %f\n", result, Dpoly2DResult[i]);
-            testStatus = false;
-        }
-        resultCheb = psPolynomial2DEval(polyCheb,Dpoly2DXYChebValue[i][0],Dpoly2DXYChebValue[i][1]);
-        if(fabs(Dpoly2DChebResult[i]-resultCheb) > ERROR_TOL ) {
-            printf("TEST ERROR: Evaluated value %f, should be %f\n", resultCheb, Dpoly2DChebResult[i]);
-            testStatus = false;
-        }
-    }
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    // Allocate polynomial with invalid type
-    polyOrd = psPolynomial2DAlloc(99, TERMS-1, TERMS-1);
-    // Attempt to evaluation invalid polynomial type
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message invalid type");
-    result = psPolynomial2DEval(polyOrd,0.0, 0.0);
-    if ( !isnan(result) ) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return NAN for invalid polynomial type");
-        testStatus = false;
-    }
-    psFree(polyOrd);
-
-    return(testStatus);
-}
-
-psS32 testPoly2DEvalVector(void)
-{
-    psBool testStatus = true;
-    // Allocate polynomial
-    psPolynomial2D* polyOrd = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, TERMS-1, TERMS-1);
-    psPolynomial2D* polyCheb = psPolynomial2DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1, TERMS-1);
-
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        for(psS32 j = 0; j < TERMS; j++) {
-            polyOrd->coeff[i][j] = poly2DCoeff[i][j];
-            polyOrd->mask[i][j]  = poly2DMask[i][j];
-            polyCheb->coeff[i][j] = 1.0;
-            polyCheb->mask[i][j]  = poly2DMask[i][j];
-        }
-    }
-
-    // Create input vectors
-    psVector* inputOrdX  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputOrdY  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebX = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebY = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        inputOrdX->data.F64[i]  = poly2DXYValue[i][0];
-        inputOrdY->data.F64[i]  = poly2DXYValue[i][1];
-        inputChebX->data.F64[i] = poly2DXYChebValue[i][0];
-        inputChebY->data.F64[i] = poly2DXYChebValue[i][1];
-    }
-
-    // Evaluate the vectors
-    psVector* outputOrd = psPolynomial2DEvalVector(polyOrd, inputOrdX, inputOrdY);
-    if(outputOrd == NULL) {
-        printf("TEST ERROR: Unexpected return of NULL.\n");
-        testStatus = false;
-    }
-    if(outputOrd->type.type != PS_TYPE_F64) {
-        printf("TEST ERROR: Output vector of type %d expected %d\n", outputOrd->type.type, PS_TYPE_F64);
-        testStatus = false;
-    }
-    psVector* outputCheb = psPolynomial2DEvalVector(polyCheb, inputChebX, inputChebY);
-    if(outputCheb == NULL) {
-        printf("TEST ERROR: Unexpected return of NULL.\n");
-        testStatus = false;
-    }
-    if(outputCheb->type.type != PS_TYPE_F64) {
-        printf("TEST ERROR: Output vector of type %d expected %d.\n", outputCheb->type.type, PS_TYPE_F64);
-        testStatus = false;
-    }
-
-    // Verify the results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        if(fabs(poly2DResult[i]-outputOrd->data.F64[i]) > ERROR_TOL) {
-            printf("TEST ERROR: Result[%d] %lg not equal to expected %lg.\n",
-                   i, outputOrd->data.F64[i], poly2DResult[i]);
-            testStatus = false;
-        }
-        if(fabs(poly2DChebResult[i]-outputCheb->data.F64[i]) > ERROR_TOL) {
-            printf("TEST ERROR: ResultCheb[%d] %lg not equal to expected %lg.\n",
-                   i, outputCheb->data.F64[i], poly2DChebResult[i]);
-            testStatus = false;
-        }
-    }
-
-    // Attempt to invoke function with null polynomial
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL polynomial");
-    if(psPolynomial2DEvalVector(NULL, inputOrdX, inputOrdY) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL polynomial.\n");
-        testStatus = false;
-    }
-
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial2DEvalVector(polyOrd,NULL,inputOrdY) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector.\n");
-        testStatus = false;
-    }
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial2DEvalVector(polyOrd,inputOrdX,NULL) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector.\n");
-        testStatus = false;
-    }
-
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdX->type.type = PS_TYPE_U8;
-    if(psPolynomial2DEvalVector(polyOrd,inputOrdX, inputOrdY) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector.\n");
-        testStatus = false;
-    }
-    inputOrdX->type.type = PS_TYPE_F64;
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdY->type.type = PS_TYPE_U8;
-    if(psPolynomial2DEvalVector(polyOrd,inputOrdX, inputOrdY) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector.\n");
-        testStatus = false;
-    }
-    inputOrdY->type.type = PS_TYPE_F64;
-
-    psFree(inputOrdX);
-    psFree(inputOrdY);
-    psFree(inputChebX);
-    psFree(inputChebY);
-    psFree(outputOrd);
-    psFree(outputCheb);
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    return(testStatus);
-}
-
Index: trunk/psLib/test/math/tst_psFunc10.c
===================================================================
--- trunk/psLib/test/math/tst_psFunc10.c	(revision 6334)
+++ 	(revision )
@@ -1,324 +1,0 @@
-/** tst_psFunc10.c
-*
-*  This test driver will exercise the psPolynomialXDEval functions for both
-*  ORD and CHEB type polynomials.
-*
-*  @version  $Revision: 1.7 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2006-01-26 21:10:22 $
-*
-* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
-*
-***************************************************************************/
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define  TERMS        4
-#define  TESTPOINTS   5
-#define  ERROR_TOL    0.001
-
-static psS32 testPoly3DEval(void);
-static psS32 testPoly3DEvalVector(void);
-
-testDescription tests[] = {
-                              {testPoly3DEval,583,"psPolynomial3DEval",true,false},
-                              {testPoly3DEvalVector,000,"psPolynomial3DEvalVector",true,false},
-                              {NULL}
-                          };
-
-psF32 poly3DCoeff[TERMS][TERMS][TERMS] = {  { { -1.1,  1.2, -1.3,  1.4},
-        {  1.5, -1.6,  1.7, -1.8},
-        {  0.1, -0.2,  0.3, -0.4},
-        { -0.5,  0.6, -0.7,  0.8}
-                                            },
-        { { -2.1,  2.2, -2.3,  2.4},
-          {  2.5, -2.6,  2.7, -2.8},
-          {  3.1, -3.2,  3.3, -3.4},
-          { -3.5,  3.6, -3.7,  3.8}
-        },
-        { { -4.1,  4.2, -4.3,  4.4},
-          {  4.5, -4.6,  4.7, -4.8},
-          {  5.1, -5.2,  5.3, -5.4},
-          { -5.5,  5.6, -5.7,  5.8}
-        },
-        { { -6.1,  6.2, -6.3,  6.4},
-          {  6.5, -6.6,  6.7, -6.8},
-          {  7.1, -7.2,  7.3, -7.4},
-          { -7.5,  7.6, -7.7,  7.8}
-        }
-                                         };
-psF64 Dpoly3DCoeff[TERMS][TERMS][TERMS] = {  { { -1.1,  1.2, -1.3,  1.4},
-        {  1.5, -1.6,  1.7, -1.8},
-        {  0.1, -0.2,  0.3, -0.4},
-        { -0.5,  0.6, -0.7,  0.8}
-                                             },
-        { { -2.1,  2.2, -2.3,  2.4},
-          {  2.5, -2.6,  2.7, -2.8},
-          {  3.1, -3.2,  3.3, -3.4},
-          { -3.5,  3.6, -3.7,  3.8}
-        },
-        { { -4.1,  4.2, -4.3,  4.4},
-          {  4.5, -4.6,  4.7, -4.8},
-          {  5.1, -5.2,  5.3, -5.4},
-          { -5.5,  5.6, -5.7,  5.8}
-        },
-        { { -6.1,  6.2, -6.3,  6.4},
-          {  6.5, -6.6,  6.7, -6.8},
-          {  7.1, -7.2,  7.3, -7.4},
-          { -7.5,  7.6, -7.7,  7.8}
-        }
-                                          };
-
-
-psF32 poly3DMask[TERMS][TERMS][TERMS]    = { {  {  0,    0,    0,    1},
-        {  0,    0,    1,    0},
-        {  1,    0,    0,    0},
-        {  0,    0,    0,    1}
-                                             },
-        {  {  1,    0,    0,    0},
-           {  1,    0,    0,    0},
-           {  1,    0,    0,    0},
-           {  1,    0,    0,    0}
-        },
-        {  {  0,    1,    0,    0},
-           {  0,    0,    1,    0},
-           {  0,    1,    0,    0},
-           {  0,    0,    1,    0}
-        },
-        {  {  1,    0,    0,    0},
-           {  0,    0,    0,    1},
-           {  1,    0,    0,    0},
-           {  0,    0,    0,    1}
-        },
-                                           };
-
-psF32 poly3DXYZValue[TESTPOINTS][3] = {  {  0.450, -0.780,  0.500},
-                                      {  0.297,  0.153, -0.354},
-                                      {  0.000,  0.153, -0.354},
-                                      {  0.297,  0.000, -0.354},
-                                      {  0.297,  0.153,  0.000}
-                                      };
-psF64 Dpoly3DXYZValue[TESTPOINTS][3] = {  {  0.450, -0.780,  0.500},
-                                       {  0.297,  0.153, -0.354},
-                                       {  0.000,  0.153, -0.354},
-                                       {  0.297,  0.000, -0.354},
-                                       {  0.297,  0.153,  0.000}
-                                       };
-psF32 poly3DResult[TESTPOINTS]  = { -1.298691, -2.011591, -1.359247, -2.548266, -1.139072};
-psF64 Dpoly3DResult[TESTPOINTS] = { -1.298691, -2.011591, -1.359247, -2.548266, -1.139072};
-
-
-psF32 poly3DXYZChebValue[TESTPOINTS][3] = {  {  0.000,  0.250, -0.250},
-        { -0.250,  0.000,  0.250},
-        {  0.250, -0.250,  0.000},
-        {  0.100, -0.300, -0.400},
-        {  0.990, -0.010,  0.500}
-                                          };
-psF64 Dpoly3DXYZChebValue[TESTPOINTS][3] = {  {  0.000,  0.250, -0.250},
-        { -0.250,  0.000,  0.250},
-        {  0.250, -0.250,  0.000},
-        {  0.100, -0.300, -0.400},
-        {  0.990, -0.010,  0.500}
-                                           };
-psF32 poly3DChebResult[TESTPOINTS]  = {  1.230469, 1.687500, 0.187500, -1.452707, 2.032344 };
-psF64 Dpoly3DChebResult[TESTPOINTS] = {  1.230469, 1.687500, 0.187500, -1.452707, 2.032344 };
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-
-    return !runTestSuite(stderr,"psPolynomialXDEval", tests, argc, argv);
-}
-
-// This test will verify operation of 1D polynomial evaluation
-psS32 testPoly3DEval(void)
-{
-    psF64  result;
-    psF64  resultCheb;
-    psBool testStatus = true;
-
-    // Allocate polynomial structure
-    psPolynomial3D*  polyOrd = psPolynomial3DAlloc(PS_POLYNOMIAL_ORD, TERMS-1, TERMS-1, TERMS-1);
-    psPolynomial3D*  polyCheb = psPolynomial3DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1, TERMS-1, TERMS-1);
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        for(psS32 j = 0; j < TERMS; j++) {
-            for(psS32 k = 0; k < TERMS; k++) {
-                polyOrd->coeff[i][j][k] = Dpoly3DCoeff[i][j][k];
-                polyOrd->mask[i][j][k]  = poly3DMask[i][j][k];
-                polyCheb->coeff[i][j][k] = 1.0;
-                polyCheb->mask[i][j][k]  = poly3DMask[i][j][k];
-            }
-        }
-    }
-    // Evaluate test points and verify results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        result = psPolynomial3DEval(polyOrd,Dpoly3DXYZValue[i][0],Dpoly3DXYZValue[i][1],
-                                    Dpoly3DXYZValue[i][2]);
-        if(fabs(Dpoly3DResult[i]-result) > ERROR_TOL ) {
-            printf("TEST ERROR: Evaluated value %lg not as expected %lg.\n",
-                   result, Dpoly3DResult[i]);
-            testStatus = false;
-        }
-        resultCheb = psPolynomial3DEval(polyCheb,Dpoly3DXYZChebValue[i][0],Dpoly3DXYZChebValue[i][1],
-                                        Dpoly3DXYZChebValue[i][2]);
-        if(fabs(Dpoly3DChebResult[i]-resultCheb) > ERROR_TOL ) {
-            printf("TEST ERROR: Evaluated Chebyshev value %lg not as expected %lg.\n",
-                   resultCheb, Dpoly3DChebResult[i]);
-            testStatus = false;
-        }
-    }
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    // Allocate polynomial with invalid type
-    polyOrd = psPolynomial3DAlloc(99, TERMS-1, TERMS-1, TERMS-1);
-    // Attempt to evaluation invalid polynomial type
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message invalid type");
-    result = psPolynomial3DEval(polyOrd,0.0, 0.0, 0.0);
-    if ( !isnan(result) ) {
-        printf("TEST ERROR: Did not return NAN for invalid polynomial type.\n");
-        testStatus = false;
-    }
-    psFree(polyOrd);
-
-    return(testStatus);
-}
-
-psS32 testPoly3DEvalVector(void)
-{
-    psBool testStatus = true;
-    // Allocate polynomial
-    psPolynomial3D* polyOrd = psPolynomial3DAlloc(PS_POLYNOMIAL_ORD, TERMS-1, TERMS-1, TERMS-1);
-    psPolynomial3D* polyCheb = psPolynomial3DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1, TERMS-1, TERMS-1);
-
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        for(psS32 j = 0; j < TERMS; j++) {
-            for(psS32 k = 0; k < TERMS; k++) {
-                polyOrd->coeff[i][j][k] = Dpoly3DCoeff[i][j][k];
-                polyOrd->mask[i][j][k]  = poly3DMask[i][j][k];
-                polyCheb->coeff[i][j][k] = 1.0;
-                polyCheb->mask[i][j][k]  = poly3DMask[i][j][k];
-            }
-        }
-    }
-
-    // Create input vectors
-    psVector* inputOrdX  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputOrdY  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputOrdZ  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebX = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebY = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebZ = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        inputOrdX->data.F64[i]  = Dpoly3DXYZValue[i][0];
-        inputOrdY->data.F64[i]  = Dpoly3DXYZValue[i][1];
-        inputOrdZ->data.F64[i]  = Dpoly3DXYZValue[i][2];
-        inputChebX->data.F64[i] = Dpoly3DXYZChebValue[i][0];
-        inputChebY->data.F64[i] = Dpoly3DXYZChebValue[i][1];
-        inputChebZ->data.F64[i] = Dpoly3DXYZChebValue[i][2];
-    }
-
-    // Evaluate the vectors
-    psVector* outputOrd = psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ);
-    if(outputOrd == NULL) {
-        printf("TEST ERROR: Unexpected return of NULL.\n");
-        testStatus = false;
-    }
-    if(outputOrd->type.type != PS_TYPE_F64) {
-        printf("TEST ERROR: Output vector of type %d expected %d.\n",
-               outputOrd->type.type, PS_TYPE_F64);
-        testStatus = false;
-    }
-    psVector* outputCheb = psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ);
-    if(outputCheb == NULL) {
-        printf("TEST ERROR: Unexpected return of NULL.\n");
-        testStatus = false;
-    }
-    if(outputCheb->type.type != PS_TYPE_F64) {
-        printf("TEST ERROR: Output vector of type %d expected %d.\n",
-               outputCheb->type.type, PS_TYPE_F64);
-        testStatus = false;
-    }
-
-    // Verify the results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        if(fabs(Dpoly3DResult[i]-outputOrd->data.F64[i]) > ERROR_TOL) {
-            printf("TEST ERROR: Result[%d] %lg not equal to expected %lg.\n",
-                   i, outputOrd->data.F64[i], Dpoly3DResult[i]);
-            testStatus = false;
-        }
-        if(fabs(Dpoly3DChebResult[i]-outputCheb->data.F64[i]) > ERROR_TOL) {
-            printf("TEST ERROR: ResultCheb[%d] %lg not equal to expected %lg.\n",
-                   i, outputCheb->data.F64[i], Dpoly3DChebResult[i]);
-            testStatus = false;
-        }
-    }
-
-    // Attempt to invoke function with null polynomial
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL polynomial");
-    if(psPolynomial3DEvalVector(NULL,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL polynomial.\n");
-        testStatus = false;
-    }
-
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial3DEvalVector(polyOrd,NULL,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector.\n");
-        testStatus = false;
-    }
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial3DEvalVector(polyOrd,inputOrdX,NULL,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector.\n");
-        testStatus = false;
-    }
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,NULL) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector.\n");
-        testStatus = false;
-    }
-
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdX->type.type = PS_TYPE_U8;
-    if(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector.\n");
-        testStatus = false;
-    }
-    inputOrdX->type.type = PS_TYPE_F64;
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdY->type.type = PS_TYPE_U8;
-    if(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector.\n");
-        testStatus = false;
-    }
-    inputOrdY->type.type = PS_TYPE_F64;
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdZ->type.type = PS_TYPE_U8;
-    if(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector.\n");
-        testStatus = false;
-    }
-    inputOrdZ->type.type = PS_TYPE_F64;
-
-    psFree(inputOrdX);
-    psFree(inputOrdY);
-    psFree(inputOrdZ);
-    psFree(inputChebX);
-    psFree(inputChebY);
-    psFree(inputChebZ);
-    psFree(outputOrd);
-    psFree(outputCheb);
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    return(testStatus);
-}
-
Index: trunk/psLib/test/math/tst_psFunc11.c
===================================================================
--- trunk/psLib/test/math/tst_psFunc11.c	(revision 6334)
+++ 	(revision )
@@ -1,590 +1,0 @@
-/** tst_psFunc11.c
-*
-*  This test driver will exercise the psPolynomialXDEval functions for both
-*  ORD and CHEB type polynomials.
-*
-*  @version  $Revision: 1.8 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2006-01-26 21:10:22 $
-*
-* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
-*
-***************************************************************************/
-
-#include "pslib_strict.h"
-#include "psTest.h"
-
-#define  TERMS        4
-#define  TESTPOINTS   5
-#define  ERROR_TOL    0.001
-
-static psS32 testPoly4DEval(void);
-static psS32 testPoly4DEvalVector(void);
-
-testDescription tests[] = {
-                              {testPoly4DEval,583,"psPolynomial4DEval",true,false},
-                              {testPoly4DEvalVector,000,"psPolynomial4DEvalVector",true,false},
-                              {NULL}
-                          };
-
-psF32 poly4DCoeff[TERMS][TERMS][TERMS][TERMS] = {
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            },
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            },
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            },
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            }
-        };
-psF64 Dpoly4DCoeff[TERMS][TERMS][TERMS][TERMS] = {
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            },
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            },
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            },
-            {
-                {
-                    { -1.1,  1.2, -1.3,  1.4},
-                    {  1.5, -1.6,  1.7, -1.8},
-                    {  0.1, -0.2,  0.3, -0.4},
-                    { -0.5,  0.6, -0.7,  0.8}
-                },
-                {
-                    { -2.1,  2.2, -2.3,  2.4},
-                    {  2.5, -2.6,  2.7, -2.8},
-                    {  3.1, -3.2,  3.3, -3.4},
-                    { -3.5,  3.6, -3.7,  3.8}
-                },
-                { { -4.1,  4.2, -4.3,  4.4},
-                  {  4.5, -4.6,  4.7, -4.8},
-                  {  5.1, -5.2,  5.3, -5.4},
-                  { -5.5,  5.6, -5.7,  5.8}
-                },
-                { { -6.1,  6.2, -6.3,  6.4},
-                  {  6.5, -6.6,  6.7, -6.8},
-                  {  7.1, -7.2,  7.3, -7.4},
-                  { -7.5,  7.6, -7.7,  7.8}
-                }
-            }
-        };
-
-psF32 poly4DMask[TERMS][TERMS][TERMS][TERMS]    = {
-            {
-                {
-                    {  0,    0,    0,    1},
-                    {  0,    0,    1,    0},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0}
-                },
-                {
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0},
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                }
-            },
-            {
-                {
-                    {  0,    0,    0,    1},
-                    {  0,    0,    1,    0},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0}
-                },
-                {
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0},
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                }
-            },
-            {
-                {
-                    {  0,    0,    0,    1},
-                    {  0,    0,    1,    0},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0}
-                },
-                {
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0},
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                }
-            },
-            {
-                {
-                    {  0,    0,    0,    1},
-                    {  0,    0,    1,    0},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0},
-                    {  1,    0,    0,    0}
-                },
-                {
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0},
-                    {  0,    1,    0,    0},
-                    {  0,    0,    1,    0}
-                },
-                {
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1},
-                    {  1,    0,    0,    0},
-                    {  0,    0,    0,    1}
-                }
-            }
-        };
-
-psF32 poly4DWXYZValue[TESTPOINTS][4] = {
-                                           {  0.450, -0.780,  0.500, -0.123},
-                                           {  0.297,  0.153, -0.354,  0.000},
-                                           {  0.000,  0.153, -0.354,  0.321},
-                                           {  0.297,  0.000, -0.354,  0.321},
-                                           {  0.297,  0.153,  0.000,  0.321}
-                                       };
-psF64 Dpoly4DWXYZValue[TESTPOINTS][4] = {
-                                            {  0.450, -0.780,  0.500, -0.123},
-                                            {  0.297,  0.153, -0.354,  0.000},
-                                            {  0.000,  0.153, -0.354,  0.321},
-                                            {  0.297,  0.000, -0.354,  0.321},
-                                            {  0.297,  0.153,  0.000,  0.321}
-                                        };
-
-psF32 poly4DResult[TESTPOINTS]  = { -3.588753, -2.439566, -1.175955, -1.645497, -1.216915};
-psF64 Dpoly4DResult[TESTPOINTS]  = { -3.588753, -2.439566, -1.175955, -1.645497, -1.216915};
-
-psF32 poly4DWXYZChebValue[TESTPOINTS][4] = {
-            {  0.100,  0.000,  0.250, -0.250},
-            {  0.100, -0.250,  0.000,  0.250},
-            {  0.100,  0.250, -0.250,  0.000},
-            {  0.300,  0.200, -0.300, -0.400},
-            { -0.780,  0.990, -0.010,  0.500}
-        };
-psF64 Dpoly4DWXYZChebValue[TESTPOINTS][4] = {
-            {  0.100,  0.000,  0.250, -0.250},
-            {  0.100, -0.250,  0.000,  0.250},
-            {  0.100,  0.250, -0.250,  0.000},
-            {  0.300,  0.200, -0.300, -0.400},
-            { -0.780,  0.990, -0.010,  0.500}
-        };
-psF32 poly4DChebResult[TESTPOINTS]   = { -0.216563, -0.297000, -0.033000, 0.432198, 1.785601 };
-psF64 Dpoly4DChebResult[TESTPOINTS]  = { -0.216563, -0.297000, -0.033000, 0.432198, 1.785601 };
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    psLogSetLevel(PS_LOG_INFO);
-
-    return !runTestSuite(stderr,"psPolynomialXDEval", tests, argc, argv);
-}
-
-// This test will verify operation of 4D polynomial evaluation
-psS32 testPoly4DEval(void)
-{
-    psBool testStatus = true;
-    // Allocate polynomial structure
-    psPolynomial4D*  polyOrd = psPolynomial4DAlloc(PS_POLYNOMIAL_ORD, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
-    psPolynomial4D*  polyCheb = psPolynomial4DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        for(psS32 j = 0; j < TERMS; j++) {
-            for(psS32 k = 0; k < TERMS; k++) {
-                for(psS32 l = 0; l < TERMS; l++) {
-                    polyOrd->coeff[i][j][k][l] = Dpoly4DCoeff[i][j][k][l];
-                    polyOrd->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
-                    polyCheb->coeff[i][j][k][l] = 1.0;
-                    polyCheb->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
-                }
-            }
-        }
-    }
-
-    // Evaluate test points and verify results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        psF64 result = psPolynomial4DEval(polyOrd, Dpoly4DWXYZValue[i][0], Dpoly4DWXYZValue[i][1],
-                                          Dpoly4DWXYZValue[i][2], Dpoly4DWXYZValue[i][3]);
-        if(fabs(Dpoly4DResult[i]-result) > ERROR_TOL ) {
-            printf("TEST ERROR: Evaluated value %lg not as expected %lg.\n",
-                   result, Dpoly4DResult[i]);
-            testStatus = false;
-        }
-
-        psF64 resultCheb = psPolynomial4DEval(polyCheb, Dpoly4DWXYZChebValue[i][0], Dpoly4DWXYZChebValue[i][1],
-                                              Dpoly4DWXYZChebValue[i][2], Dpoly4DWXYZChebValue[i][3]);
-        if(fabs(Dpoly4DChebResult[i]-resultCheb) > ERROR_TOL ) {
-            printf("TEST ERROR: Evaluated Chebyshev value %lg not as expected %lg.\n",
-                   resultCheb, Dpoly4DChebResult[i]);
-            testStatus = false;
-        }
-    }
-
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    // Allocate polynomial with invalid type
-    polyOrd = psPolynomial4DAlloc(99, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
-    // Attempt to evaluation invalid polynomial type
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message invalid type");
-    psF64 result = psPolynomial4DEval(polyOrd,0.0, 0.0, 0.0, 0.0);
-    if ( !isnan(result) ) {
-        printf("TEST ERROR: Did not return NAN for invalid polynomial type");
-        testStatus = false;
-    }
-    psFree(polyOrd);
-
-    return(testStatus);
-}
-
-psS32 testPoly4DEvalVector(void)
-{
-    psBool testStatus = true;
-    // Allocate polynomial
-    psPolynomial4D* polyOrd = psPolynomial4DAlloc(PS_POLYNOMIAL_ORD, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
-    psPolynomial4D* polyCheb = psPolynomial4DAlloc(PS_POLYNOMIAL_CHEB, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
-
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        for(psS32 j = 0; j < TERMS; j++) {
-            for(psS32 k = 0; k < TERMS; k++) {
-                for(psS32 l = 0; l < TERMS; l++) {
-                    polyOrd->coeff[i][j][k][l] = Dpoly4DCoeff[i][j][k][l];
-                    polyOrd->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
-                    polyCheb->coeff[i][j][k][l] = 1.0;
-                    polyCheb->mask[i][j][k][l]  = poly4DMask[i][j][k][l];
-                }
-            }
-        }
-    }
-
-    // Create input vectors
-    psVector* inputOrdW  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputOrdX  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputOrdY  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputOrdZ  = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebW = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebX = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebY = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    psVector* inputChebZ = psVectorAlloc(TESTPOINTS, PS_TYPE_F64);
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        inputOrdW->data.F64[i]  = Dpoly4DWXYZValue[i][0];
-        inputOrdX->data.F64[i]  = Dpoly4DWXYZValue[i][1];
-        inputOrdY->data.F64[i]  = Dpoly4DWXYZValue[i][2];
-        inputOrdZ->data.F64[i]  = Dpoly4DWXYZValue[i][3];
-        inputChebW->data.F64[i] = Dpoly4DWXYZChebValue[i][0];
-        inputChebX->data.F64[i] = Dpoly4DWXYZChebValue[i][1];
-        inputChebY->data.F64[i] = Dpoly4DWXYZChebValue[i][2];
-        inputChebZ->data.F64[i] = Dpoly4DWXYZChebValue[i][3];
-    }
-
-    // Evaluate the vectors
-    psVector* outputOrd = psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ);
-    if(outputOrd == NULL) {
-        printf("TEST ERROR: Unexpected return of NULL.");
-        testStatus = false;
-    }
-    if(outputOrd->type.type != PS_TYPE_F64) {
-        printf("TEST ERROR: Output vector of type %d expected %d",
-               outputOrd->type.type, PS_TYPE_F64);
-        testStatus = false;
-    }
-
-    psVector* outputCheb = psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ);
-    if(outputCheb == NULL) {
-        printf("TEST ERROR: Unexpected return of NULL.");
-        testStatus = false;
-    }
-    if(outputCheb->type.type != PS_TYPE_F64) {
-        printf("TEST ERROR: Output vector of type %d expected %d",
-               outputCheb->type.type, PS_TYPE_F64);
-        testStatus = false;
-    }
-
-    // Verify the results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        if(fabs(Dpoly4DResult[i]-outputOrd->data.F64[i]) > ERROR_TOL) {
-            printf("TEST ERROR: Result[%d] %lg not equal to expected %lg",
-                   i, outputOrd->data.F64[i], Dpoly4DResult[i]);
-            testStatus = false;
-        }
-        if(fabs(Dpoly4DChebResult[i]-outputCheb->data.F64[i]) > ERROR_TOL) {
-            printf("TEST ERROR: ResultCheb[%d] %lg not equal to expected %lg",
-                   i, outputCheb->data.F64[i], Dpoly4DChebResult[i]);
-            testStatus = false;
-        }
-    }
-
-    // Attempt to invoke function with null polynomial
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL polynomial");
-    if(psPolynomial4DEvalVector(NULL,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL polynomial");
-        testStatus = false;
-    }
-
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial4DEvalVector(polyOrd,NULL,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector");
-        testStatus = false;
-    }
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,NULL,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector");
-        testStatus = false;
-    }
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,NULL,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector");
-        testStatus = false;
-    }
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,NULL) != NULL) {
-        printf("TEST ERROR: Return of NULL expected for NULL input vector");
-        testStatus = false;
-    }
-
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdX->type.type = PS_TYPE_U8;
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector");
-        testStatus = false;
-    }
-    inputOrdX->type.type = PS_TYPE_F64;
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdY->type.type = PS_TYPE_U8;
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector");
-        testStatus = false;
-    }
-    inputOrdY->type.type = PS_TYPE_F64;
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdZ->type.type = PS_TYPE_U8;
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector");
-        testStatus = false;
-    }
-    inputOrdZ->type.type = PS_TYPE_F64;
-    // Attempt to invoke function with a non F64 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrdW->type.type = PS_TYPE_U8;
-    if(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) != NULL) {
-        printf("TEST ERROR: Return NULL expected for non-F64 input vector");
-        testStatus = false;
-    }
-    inputOrdW->type.type = PS_TYPE_F64;
-
-    psFree(inputOrdX);
-    psFree(inputOrdY);
-    psFree(inputOrdZ);
-    psFree(inputOrdW);
-    psFree(inputChebW);
-    psFree(inputChebX);
-    psFree(inputChebY);
-    psFree(inputChebZ);
-    psFree(outputOrd);
-    psFree(outputCheb);
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    return(testStatus);
-}
Index: trunk/psLib/test/math/tst_psMinimize05.c
===================================================================
--- trunk/psLib/test/math/tst_psMinimize05.c	(revision 6334)
+++ 	(revision )
@@ -1,283 +1,0 @@
-/*****************************************************************************
-    This routine must ensure that psMinimizePowell() works correctly.
- 
-    We test with a NULL and non-NULL paramMask.
- 
-    XXX: Must verify the stderr for the NULL parameter tests.
- *****************************************************************************/
-#include <stdio.h>
-#include <math.h>
-#include "pslib.h"
-#include "psTest.h"
-#define N 5
-#define MIN_VALUE 20.0
-#define NUM_PARAMS 10
-#define ERROR_TOLERANCE 0.10
-float expectedParm[NUM_PARAMS];
-psS32 testStatus = true;
-
-/*****************************************************************************
-myFunc(): This routine subtracts the associate value in expectedParm[] from
-each parameter and then squares it, then sums that for all parameters, then
-adds MIN_VALUE to it.  The minimum for this function will be MIN_VALUE, and
-will occur when each parameter equals the associated value in expectedParm[].
- 
-This procedure ignores the coordinates, other than to ensure that they were
-passed correctly from psMinimizePowell().
- *****************************************************************************/
-float myFunc(psVector *myParams,
-             psArray *myCoords)
-{
-    float sum = 0.0;
-    float coordData = 0.0;
-    float expData = 0.0;
-    psS32 i;
-
-    //
-    // Simply ensure that the coordinate data was passed correctly.
-    //
-    for (i=0;i<N;i++) {
-        coordData = ((psVector *) (myCoords->data[i]))->data.F32[0];
-        expData = (float) (i+10);
-        if (fabs(coordData - expData) > FLT_EPSILON) {
-            printf("ERROR(1): coordinate data was incorrectly passed to myFunc()\n");
-            printf("ERROR(1): was (%f) should be (%f)\n", coordData, expData);
-            testStatus = false;
-        }
-        coordData = ((psVector *) (myCoords->data[i]))->data.F32[1];
-        expData = (float) (i+3);
-        if (fabs(coordData - expData) > FLT_EPSILON) {
-            printf("ERROR(2): coordinate data was incorrectly passed to myFunc()\n");
-            printf("ERROR(2): was (%f) should be (%f)\n", coordData, expData);
-            testStatus = false;
-        }
-    }
-
-
-    sum = 0.0;
-    for (i=0;i<NUM_PARAMS;i++) {
-        sum+= (myParams->data.F32[i] - expectedParm[i]) * (myParams->data.F32[i] - expectedParm[i]);
-    }
-    sum = MIN_VALUE + (sum * sum);
-
-    return(sum);
-}
-
-
-psS32 t00()
-{
-    psS32 currentId = psMemGetId();
-    psS32 memLeaks = 0;
-    psS32 i = 0;
-    psArray *myCoords;
-    psVector *myParams;
-    psVector *myParamMask;
-    psMinimization *min;
-
-    psTraceSetLevel(".psLib", 0);
-    /**************************************************************************
-     *************************************************************************/
-    myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
-    myParamMask = psVectorAlloc(NUM_PARAMS, PS_TYPE_U8);
-    min = psMinimizationAlloc(100, 0.01);
-
-    myCoords = psArrayAlloc(N);
-    for (i=0;i<N;i++) {
-        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
-        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
-        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
-    }
-    for (i=0;i<NUM_PARAMS;i++) {
-        expectedParm[i] = 2.32 + (float) (2 * i);
-        myParams->data.F32[i] = 0.0;
-        myParams->data.F32[i] = (float) i;
-        myParamMask->data.U8[i] = 0;
-    }
-
-    printPositiveTestHeader(stdout,
-                            "psMinimize functions",
-                            "psMinimizePowell()");
-
-    psMinimizePowell(min,
-                     myParams,
-                     myParamMask,
-                     myCoords,
-                     (psMinimizePowellFunc) myFunc);
-
-    printf("\nThe minimum is %f (expected: %f)\n", min->value, MIN_VALUE);
-
-    for (i=0;i<NUM_PARAMS;i++) {
-        printf("Parameter %d at the minimum is %f (expected: %f)\n", i,
-               myParams->data.F32[i], expectedParm[i]);
-
-        if (fabs(myParams->data.F32[i] - expectedParm[i]) > fabs(ERROR_TOLERANCE * expectedParm[i])) {
-            printf("ERROR: Parameter %d: (%.1f), expected was (%.1f)\n",
-                   i, myParams->data.F32[i], expectedParm[i]);
-            testStatus = false;
-        } else {
-            printf("Parameter %d: (%.1f), expected was (%.1f)\n",
-                   i, myParams->data.F32[i], expectedParm[i]);
-        }
-    }
-
-
-    psFree(myCoords);
-    psFree(myParams);
-    psFree(myParamMask);
-    psFree(min);
-
-    psMemCheckCorruption(1);
-    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
-    if (0 != memLeaks) {
-        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
-    }
-    printFooter(stdout,
-                "psMinimize functions",
-                "psMinimizePowell()",
-                testStatus);
-
-
-    return (!testStatus);
-}
-
-psS32 t01()
-{
-    psS32 currentId = psMemGetId();
-    psS32 memLeaks = 0;
-    psS32 i = 0;
-    psArray *myCoords;
-    psVector *myParams;
-    psMinimization *min;
-
-    psTraceSetLevel(".psLib", 0);
-    /**************************************************************************
-     *************************************************************************/
-    myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
-    min = psMinimizationAlloc(100, 0.01);
-
-    myCoords = psArrayAlloc(N);
-    for (i=0;i<N;i++) {
-        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
-        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
-        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
-    }
-    for (i=0;i<NUM_PARAMS;i++) {
-        expectedParm[i] = 2.32 + (float) (2 * i);
-        myParams->data.F32[i] = 0.0;
-        myParams->data.F32[i] = (float) i;
-    }
-
-    printPositiveTestHeader(stdout,
-                            "psMinimize functions",
-                            "psMinimizePowell()");
-
-    psMinimizePowell(min,
-                     myParams,
-                     NULL,
-                     myCoords,
-                     (psMinimizePowellFunc) myFunc);
-
-    printf("\nThe minimum is %f (expected: %f)\n", min->value, MIN_VALUE);
-
-    for (i=0;i<NUM_PARAMS;i++) {
-        printf("Parameter %d at the minimum is %f (expected: %f)\n", i,
-               myParams->data.F32[i], expectedParm[i]);
-
-        if (fabs(myParams->data.F32[i] - expectedParm[i]) > fabs(ERROR_TOLERANCE * expectedParm[i])) {
-            printf("ERROR: Parameter %d: (%.1f), expected was (%.1f)\n",
-                   i, myParams->data.F32[i], expectedParm[i]);
-            testStatus = false;
-        } else {
-            printf("Parameter %d: (%.1f), expected was (%.1f)\n",
-                   i, myParams->data.F32[i], expectedParm[i]);
-        }
-    }
-
-
-    psFree(myCoords);
-    psFree(myParams);
-    psFree(min);
-
-    psMemCheckCorruption(1);
-    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
-    if (0 != memLeaks) {
-        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
-    }
-    printFooter(stdout,
-                "psMinimize functions",
-                "psMinimizePowell()",
-                testStatus);
-
-
-    return (!testStatus);
-}
-
-psS32 t02()
-{
-    psS32 currentId = psMemGetId();
-    psS32 memLeaks = 0;
-    psS32 i = 0;
-    psArray *myCoords;
-    psVector *myParams;
-    psVector *myParamMask;
-    psMinimization *min;
-
-    psTraceSetLevel(".psLib", 0);
-    /**************************************************************************
-     *************************************************************************/
-    myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
-    myParamMask = psVectorAlloc(NUM_PARAMS, PS_TYPE_U8);
-    min = psMinimizationAlloc(100, 0.01);
-
-    myCoords = psArrayAlloc(N);
-    for (i=0;i<N;i++) {
-        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
-        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
-        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
-    }
-    for (i=0;i<NUM_PARAMS;i++) {
-        expectedParm[i] = 2.32 + (float) (2 * i);
-        myParams->data.F32[i] = 0.0;
-        myParams->data.F32[i] = (float) i;
-        myParamMask->data.U8[i] = 0;
-    }
-
-    printPositiveTestHeader(stdout,
-                            "psMinimize functions",
-                            "psMinimizePowell(): various NULL inputs");
-
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for null minimize.");
-    psMinimizePowell(NULL, myParams, myParamMask, myCoords, (psMinimizePowellFunc) myFunc);
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for null parameter vector");
-    psMinimizePowell(min, NULL, myParamMask, myCoords,(psMinimizePowellFunc) myFunc);
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for null coords.");
-    psMinimizePowell(min, myParams, myParamMask, NULL, (psMinimizePowellFunc) myFunc);
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for null function");
-    psMinimizePowell(min, myParams, myParamMask, myCoords, NULL);
-
-    psFree(myCoords);
-    psFree(myParams);
-    psFree(myParamMask);
-    psFree(min);
-
-    psMemCheckCorruption(1);
-    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
-    if (0 != memLeaks) {
-        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
-    }
-    printFooter(stdout,
-                "psMinimize functions",
-                "psMinimizePowell(): various NULL inputs",
-                testStatus);
-
-
-    return (!testStatus);
-}
-
-psS32 main()
-{
-    psLogSetFormat("HLNM");
-    t00();
-    t01();
-    t02();
-}
Index: trunk/psLib/test/math/tst_psMinimize06.c
===================================================================
--- trunk/psLib/test/math/tst_psMinimize06.c	(revision 6334)
+++ 	(revision )
@@ -1,153 +1,0 @@
-/*****************************************************************************
-    This routine must ensure that psMinimizeLM() works correctly.
- 
-    XXX: This code needs a lot of additional test case work.
-    XXX: Use the tst_template.
-    XXX: Print headers and footers.
-    XXX: Why are we flushing stdout?
- *****************************************************************************/
-#include <stdio.h>
-#include "pslib_strict.h"
-#include "psTest.h"
-#include <math.h>
-#define NUM_ITERATIONS 100
-#define ERR_TOL 0.1
-#define NUM_DATA_POINTS 20
-#define NUM_PARAMS 5
-float expectedParm[NUM_PARAMS];
-psS32 testStatus = true;
-
-/*****************************************************************************
-myFunc():
-    sum = param[0] + x[0] * x[1] +
-          param[1] * x[0] + 
-          param[2] * x[0]^2 +
-          param[3] * x[1] + 
-          param[4] * x[1]^2
- 
- *****************************************************************************/
-psF32 myFunc(psVector *deriv,
-             psVector *params,
-             psVector *x)
-{
-    if ((deriv == NULL) || (params == NULL) || (x == NULL)) {
-        psError(PS_ERR_UNKNOWN, true, "deriv or params or x is NULL.\n");
-    }
-
-    psF32 sum = (params->data.F32[0] * x->data.F32[0] * x->data.F32[1]) +
-                (params->data.F32[1] * x->data.F32[0]) +
-                (params->data.F32[2] * PS_SQR(x->data.F32[0])) +
-                (params->data.F32[3] * x->data.F32[1]) +
-                (params->data.F32[4] * PS_SQR(x->data.F32[1]));
-
-    deriv->data.F32[0] = x->data.F32[0] * x->data.F32[1];
-    deriv->data.F32[1] = x->data.F32[0];
-    deriv->data.F32[2] = PS_SQR(x->data.F32[0]);
-    deriv->data.F32[3] = x->data.F32[1];
-    deriv->data.F32[4] = PS_SQR(x->data.F32[1]);
-
-    return(sum);
-}
-
-psS32 t01()
-{
-    psS32 currentId = psMemGetId();
-
-    psMinimization *min = psMinimizationAlloc(NUM_ITERATIONS, ERR_TOL);
-    psImage *myCovar = psImageAlloc(NUM_PARAMS, NUM_PARAMS, PS_TYPE_F32);
-    psVector *myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
-    psVector *myDerivs = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
-    psArray *myCoords = psArrayAlloc(NUM_DATA_POINTS);
-    psVector *y = psVectorAlloc(NUM_DATA_POINTS, PS_TYPE_F32);
-
-    for (psS32 i=0;i<NUM_DATA_POINTS;i++) {
-        myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
-        ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
-        ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
-        psTrace(__func__, 5, "x[%d] is vector (%f, %f)\n", i, ((psVector *) (myCoords->data[i]))->data.F32[0],
-                ((psVector *) (myCoords->data[i]))->data.F32[1]);
-        y->data.F32[i] = (float) i;
-    }
-    for (psS32 i=0;i<NUM_PARAMS;i++) {
-        expectedParm[i] = 2.42 + (float) (2 * i);
-        myParams->data.F32[i] = (float) (2 * i);
-    }
-
-    psBool rc = psMinimizeLMChi2(min, NULL, myParams, NULL, myCoords, y, NULL,
-                                 (psMinimizeLMChi2Func) myFunc);
-    if (rc == false) {
-        printf("TEST ERROR: psMinimizeLMChi2() returned FALSE.\n");
-        fflush(stdout);
-        testStatus = false;
-    } else {
-        printf("\nThe value of the function at the minimum is %f\n", min->value);
-        for (psS32 i=0;i<NUM_DATA_POINTS;i++) {
-            printf("The minimum for data point number %d: f is %.2f\n",
-                   i, myFunc(myDerivs, myParams, (psVector *) myCoords->data[i]));
-            fflush(stdout);
-        }
-
-        for (psS32 i=0;i<NUM_PARAMS;i++) {
-            printf("Parameter %d at the minimum is %f (expected: %f)\n", i,
-                   myParams->data.F32[i], expectedParm[i]);
-            fflush(stdout);
-        }
-    }
-
-    psFree(min);
-    psFree(myCovar);
-    psFree(myParams);
-    psFree(myDerivs);
-    psFree(myCoords);
-    psFree(y);
-    psMemCheckCorruption(1);
-    psS32 memLeaks = psMemCheckLeaks(currentId, NULL, NULL, false);
-    if (0 != memLeaks) {
-        printf("TEST ERROR: Memory Leaks! (%d leaks).\n", memLeaks);
-        fflush(stdout);
-        // XXX: This is causing a seg fault
-        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
-    }
-    return (!testStatus);
-}
-
-
-
-psS32 main()
-{
-    psLogSetFormat("HLNM");
-    psTraceSetDestination(1);
-    psTraceSetLevel(".", 0);
-    psTraceSetLevel(__func__, 0);
-    psTraceSetLevel("t01", 0);
-    psTraceSetLevel("psMinimizeLMChi2_OLD", 0);
-    psTraceSetLevel("psMinimizeLMChi2", 0);
-    psTraceSetLevel("psMinimizeGaussNewtonDelta", 0);
-    psTraceSetLevel("psMinimizeGaussNewtonDelta_EAM", 0);
-    psTraceSetLevel("p_psMinLM_GuessABP", 0);
-    psTraceSetLevel("p_psMinLM_GuessABP_EAM", 0);
-    psTraceSetLevel("p_psMinLM_SetABX", 0);
-    psTraceSetLevel("psGaussJordan", 0);
-    psTraceSetLevel("psMinimizationAlloc", 0);
-    psTraceSetLevel("psMemCheckMinimization", 0);
-    psTraceSetLevel("p_psDetermineBracket", 0);
-    psTraceSetLevel("p_psDetermineBracket2", 0);
-    psTraceSetLevel("p_psLineMin", 0);
-    psTraceSetLevel("psMinimizePowell", 0);
-    psTraceSetLevel("myPowellChi2Func", 0);
-    psTraceSetLevel("psMinimizeChi2Powell", 0);
-    psTraceSetLevel("BuildSums1D", 0);
-    psTraceSetLevel("BuildSums2D", 0);
-    psTraceSetLevel("Polynomial2DEvalVectorD", 0);
-    psTraceSetLevel("vectorFitPolynomial1DCheby", 0);
-    psTraceSetLevel("VectorFitPolynomial1DOrd", 0);
-    psTraceSetLevel("psVectorFitPolynomial1D", 0);
-    psTraceSetLevel("psVectorClipFitPolynomial1D", 0);
-
-    psTrace(__func__, 2, "Calling new psMinimize().\n");
-    t01();
-    printf("DONE\n");
-    fflush(stdout);
-}
-
-
Index: trunk/psLib/test/types/.cvsignore
===================================================================
--- trunk/psLib/test/types/.cvsignore	(revision 6334)
+++ trunk/psLib/test/types/.cvsignore	(revision 6335)
@@ -38,2 +38,5 @@
 tst_psMetadata_07
 tst_psPixels
+MDCopy.in
+MDCopy.out
+tst_psArguments
