Changeset 1345
- Timestamp:
- Jul 29, 2004, 2:39:18 PM (22 years ago)
- Location:
- trunk/psLib
- Files:
-
- 5 edited
-
src/dataManip/psMinimize.c (modified) (3 diffs)
-
src/dataManip/psMinimize.h (modified) (1 diff)
-
src/math/psMinimize.c (modified) (3 diffs)
-
src/math/psMinimize.h (modified) (1 diff)
-
test/dataManip/tst_psMinimize04.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psMinimize.c
r1277 r1345 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-07- 22 23:40:08$11 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-07-30 00:39:14 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 869 869 *****************************************************************************/ 870 870 psPolynomial1D * 871 ps GetArrayPolynomial(psPolynomial1D *myPoly,872 const psVector *restrict x,873 const psVector *restrict y,874 const psVector *restrict yErr)871 psVectorFitPolynomial1D(psPolynomial1D *myPoly, 872 const psVector *restrict x, 873 const psVector *restrict y, 874 const psVector *restrict yErr) 875 875 { 876 876 int polyOrder = myPoly->n; … … 886 886 psVector *xSums = NULL; 887 887 888 // printf("ps GetArrayPolynomial()\n");888 // printf("psVectorFitPolynomial1D()\n"); 889 889 // for (i=0;i<x->n;i++) { 890 890 // printf("(x, y, yErr) is (%f, %f, %f)\n", x->data.F64[i], y->data.F64[i], yErr->data.F64[i]); -
trunk/psLib/src/dataManip/psMinimize.h
r1281 r1345 39 39 /** Derive a polynomial fit by chi^2 minimisation (analytically) */ 40 40 psPolynomial1D * 41 ps GetArrayPolynomial(psPolynomial1D *myPoly, ///< Polynomial to fit42 const psVector *restrict x, ///< Ordinates (or NULL to just use the indices)43 const psVector *restrict y, ///< Coordinates44 const psVector *restrict yErr ///< Errors in coordinates, or NULL45 );41 psVectorFitPolynomial1D(psPolynomial1D *myPoly, ///< Polynomial to fit 42 const psVector *restrict x, ///< Ordinates (or NULL to just use the indices) 43 const psVector *restrict y, ///< Coordinates 44 const psVector *restrict yErr ///< Errors in coordinates, or NULL 45 ); 46 46 47 47 /* \} */ // End of MathGroup Functions -
trunk/psLib/src/math/psMinimize.c
r1278 r1345 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-07- 22 23:40:08$11 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-07-30 00:39:14 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 869 869 *****************************************************************************/ 870 870 psPolynomial1D * 871 ps GetArrayPolynomial(psPolynomial1D *myPoly,872 const psVector *restrict x,873 const psVector *restrict y,874 const psVector *restrict yErr)871 psVectorFitPolynomial1D(psPolynomial1D *myPoly, 872 const psVector *restrict x, 873 const psVector *restrict y, 874 const psVector *restrict yErr) 875 875 { 876 876 int polyOrder = myPoly->n; … … 886 886 psVector *xSums = NULL; 887 887 888 // printf("ps GetArrayPolynomial()\n");888 // printf("psVectorFitPolynomial1D()\n"); 889 889 // for (i=0;i<x->n;i++) { 890 890 // printf("(x, y, yErr) is (%f, %f, %f)\n", x->data.F64[i], y->data.F64[i], yErr->data.F64[i]); -
trunk/psLib/src/math/psMinimize.h
r1281 r1345 39 39 /** Derive a polynomial fit by chi^2 minimisation (analytically) */ 40 40 psPolynomial1D * 41 ps GetArrayPolynomial(psPolynomial1D *myPoly, ///< Polynomial to fit42 const psVector *restrict x, ///< Ordinates (or NULL to just use the indices)43 const psVector *restrict y, ///< Coordinates44 const psVector *restrict yErr ///< Errors in coordinates, or NULL45 );41 psVectorFitPolynomial1D(psPolynomial1D *myPoly, ///< Polynomial to fit 42 const psVector *restrict x, ///< Ordinates (or NULL to just use the indices) 43 const psVector *restrict y, ///< Coordinates 44 const psVector *restrict yErr ///< Errors in coordinates, or NULL 45 ); 46 46 47 47 /* \} */ // End of MathGroup Functions -
trunk/psLib/test/dataManip/tst_psMinimize04.c
r1190 r1345 1 1 /***************************************************************************** 2 This routine must ensure that the ps GetArrayPolynomialworks correctly.2 This routine must ensure that the psVectorFitPolynomial1D works correctly. 3 3 *****************************************************************************/ 4 4 #include <stdio.h> … … 45 45 } 46 46 47 ps GetArrayPolynomial(myPoly, x, y, yErr);47 psVectorFitPolynomial1D(myPoly, x, y, yErr); 48 48 49 49 for (i=0;i<POLY_ORDER+1;i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
