Changeset 3374
- Timestamp:
- Mar 4, 2005, 10:51:20 AM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 5 edited
-
dataManip/psFunctions.c (modified) (9 diffs)
-
dataManip/psStats.c (modified) (5 diffs)
-
math/psPolynomial.c (modified) (9 diffs)
-
math/psSpline.c (modified) (9 diffs)
-
math/psStats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psFunctions.c
r3264 r3374 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 89$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 19:26:23$9 * @version $Revision: 1.90 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-04 20:51:20 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1206 1206 PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL); 1207 1207 1208 psVector *tmp = NULL;1209 psVector *myX = NULL;1208 psVector *tmp; 1209 psVector *myX; 1210 1210 psS32 i; 1211 1211 … … 1248 1248 PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NULL); 1249 1249 1250 psVector *tmp = NULL;1251 psVector *myX = NULL;1252 psVector *myY = NULL;1250 psVector *tmp; 1251 psVector *myX; 1252 psVector *myY; 1253 1253 psS32 i; 1254 1254 psS32 vecLen=x->n; … … 1306 1306 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL); 1307 1307 1308 psVector *tmp = NULL;1309 psVector *myX = NULL;1310 psVector *myY = NULL;1311 psVector *myZ = NULL;1308 psVector *tmp; 1309 psVector *myX; 1310 psVector *myY; 1311 psVector *myZ; 1312 1312 psS32 i; 1313 1313 psS32 vecLen=x->n; … … 1374 1374 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL); 1375 1375 1376 psVector *tmp = NULL;1377 psVector *myW = NULL;1378 psVector *myX = NULL;1379 psVector *myY = NULL;1380 psVector *myZ = NULL;1376 psVector *tmp; 1377 psVector *myW; 1378 psVector *myX; 1379 psVector *myY; 1380 psVector *myZ; 1381 1381 psS32 i; 1382 1382 psS32 vecLen=x->n; … … 1607 1607 PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F64, NULL); 1608 1608 1609 psVector *tmp = NULL;1610 psVector *myX = NULL;1609 psVector *tmp; 1610 psVector *myX; 1611 1611 psS32 i; 1612 1612 … … 1652 1652 PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F64, NULL); 1653 1653 1654 psVector *tmp = NULL;1655 psVector *myX = NULL;1656 psVector *myY = NULL;1654 psVector *tmp; 1655 psVector *myX; 1656 psVector *myY; 1657 1657 psS32 i; 1658 1658 psS32 vecLen=x->n; … … 1714 1714 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL); 1715 1715 1716 psVector *tmp = NULL;1717 psVector *myX = NULL;1718 psVector *myY = NULL;1719 psVector *myZ = NULL;1716 psVector *tmp; 1717 psVector *myX; 1718 psVector *myY; 1719 psVector *myZ; 1720 1720 psS32 i; 1721 1721 psS32 vecLen=x->n; … … 1786 1786 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL); 1787 1787 1788 psVector *tmp = NULL;1789 psVector *myW = NULL;1790 psVector *myX = NULL;1791 psVector *myY = NULL;1792 psVector *myZ = NULL;1788 psVector *tmp; 1789 psVector *myW; 1790 psVector *myX; 1791 psVector *myY; 1792 psVector *myZ; 1793 1793 psS32 i; 1794 1794 psS32 vecLen=x->n; -
trunk/psLib/src/dataManip/psStats.c
r3355 r3374 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.11 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-03-0 1 22:21:34$11 * @version $Revision: 1.118 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-03-04 20:51:20 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1006 1006 1007 1007 XXX: Use static vectors for tmpMask. 1008 1009 XXX: This has not been tested. 1008 1010 *****************************************************************************/ 1009 1011 psS32 p_psVectorClippedStats(const psVector* myVector, … … 1016 1018 psF32 clippedStdev = 0.0; // self-explanatory 1017 1019 psVector* tmpMask = NULL; // Temporary vector for masks during iterations. 1018 psStats *statsTmp = NULL; // Temporary psStats struct.1020 static psStats *statsTmp = NULL; // Temporary psStats struct. 1019 1021 psS32 rc = 0; // Return code. 1020 1022 … … 1040 1042 // However, we do no want to modify the original mask vector. 1041 1043 tmpMask = psVectorAlloc(myVector->n, PS_TYPE_U8); 1044 PS_VECTOR_SET_U8(tmpMask, 0); 1042 1045 1043 1046 // If we were called with a mask vector, then initialize the temporary … … 1068 1071 1069 1072 // 3. Use the sample median as the first estimator of the mean X. 1070 clippedMean = statsTmp->sampleMe an;1073 clippedMean = statsTmp->sampleMedian; 1071 1074 1072 1075 // 4. Use the sample stdev as the first estimator of the mean stdev. -
trunk/psLib/src/math/psPolynomial.c
r3264 r3374 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 89$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 19:26:23$9 * @version $Revision: 1.90 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-04 20:51:20 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1206 1206 PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL); 1207 1207 1208 psVector *tmp = NULL;1209 psVector *myX = NULL;1208 psVector *tmp; 1209 psVector *myX; 1210 1210 psS32 i; 1211 1211 … … 1248 1248 PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NULL); 1249 1249 1250 psVector *tmp = NULL;1251 psVector *myX = NULL;1252 psVector *myY = NULL;1250 psVector *tmp; 1251 psVector *myX; 1252 psVector *myY; 1253 1253 psS32 i; 1254 1254 psS32 vecLen=x->n; … … 1306 1306 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL); 1307 1307 1308 psVector *tmp = NULL;1309 psVector *myX = NULL;1310 psVector *myY = NULL;1311 psVector *myZ = NULL;1308 psVector *tmp; 1309 psVector *myX; 1310 psVector *myY; 1311 psVector *myZ; 1312 1312 psS32 i; 1313 1313 psS32 vecLen=x->n; … … 1374 1374 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL); 1375 1375 1376 psVector *tmp = NULL;1377 psVector *myW = NULL;1378 psVector *myX = NULL;1379 psVector *myY = NULL;1380 psVector *myZ = NULL;1376 psVector *tmp; 1377 psVector *myW; 1378 psVector *myX; 1379 psVector *myY; 1380 psVector *myZ; 1381 1381 psS32 i; 1382 1382 psS32 vecLen=x->n; … … 1607 1607 PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F64, NULL); 1608 1608 1609 psVector *tmp = NULL;1610 psVector *myX = NULL;1609 psVector *tmp; 1610 psVector *myX; 1611 1611 psS32 i; 1612 1612 … … 1652 1652 PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F64, NULL); 1653 1653 1654 psVector *tmp = NULL;1655 psVector *myX = NULL;1656 psVector *myY = NULL;1654 psVector *tmp; 1655 psVector *myX; 1656 psVector *myY; 1657 1657 psS32 i; 1658 1658 psS32 vecLen=x->n; … … 1714 1714 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL); 1715 1715 1716 psVector *tmp = NULL;1717 psVector *myX = NULL;1718 psVector *myY = NULL;1719 psVector *myZ = NULL;1716 psVector *tmp; 1717 psVector *myX; 1718 psVector *myY; 1719 psVector *myZ; 1720 1720 psS32 i; 1721 1721 psS32 vecLen=x->n; … … 1786 1786 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL); 1787 1787 1788 psVector *tmp = NULL;1789 psVector *myW = NULL;1790 psVector *myX = NULL;1791 psVector *myY = NULL;1792 psVector *myZ = NULL;1788 psVector *tmp; 1789 psVector *myW; 1790 psVector *myX; 1791 psVector *myY; 1792 psVector *myZ; 1793 1793 psS32 i; 1794 1794 psS32 vecLen=x->n; -
trunk/psLib/src/math/psSpline.c
r3264 r3374 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1. 89$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 19:26:23$9 * @version $Revision: 1.90 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-04 20:51:20 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1206 1206 PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL); 1207 1207 1208 psVector *tmp = NULL;1209 psVector *myX = NULL;1208 psVector *tmp; 1209 psVector *myX; 1210 1210 psS32 i; 1211 1211 … … 1248 1248 PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NULL); 1249 1249 1250 psVector *tmp = NULL;1251 psVector *myX = NULL;1252 psVector *myY = NULL;1250 psVector *tmp; 1251 psVector *myX; 1252 psVector *myY; 1253 1253 psS32 i; 1254 1254 psS32 vecLen=x->n; … … 1306 1306 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL); 1307 1307 1308 psVector *tmp = NULL;1309 psVector *myX = NULL;1310 psVector *myY = NULL;1311 psVector *myZ = NULL;1308 psVector *tmp; 1309 psVector *myX; 1310 psVector *myY; 1311 psVector *myZ; 1312 1312 psS32 i; 1313 1313 psS32 vecLen=x->n; … … 1374 1374 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL); 1375 1375 1376 psVector *tmp = NULL;1377 psVector *myW = NULL;1378 psVector *myX = NULL;1379 psVector *myY = NULL;1380 psVector *myZ = NULL;1376 psVector *tmp; 1377 psVector *myW; 1378 psVector *myX; 1379 psVector *myY; 1380 psVector *myZ; 1381 1381 psS32 i; 1382 1382 psS32 vecLen=x->n; … … 1607 1607 PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F64, NULL); 1608 1608 1609 psVector *tmp = NULL;1610 psVector *myX = NULL;1609 psVector *tmp; 1610 psVector *myX; 1611 1611 psS32 i; 1612 1612 … … 1652 1652 PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F64, NULL); 1653 1653 1654 psVector *tmp = NULL;1655 psVector *myX = NULL;1656 psVector *myY = NULL;1654 psVector *tmp; 1655 psVector *myX; 1656 psVector *myY; 1657 1657 psS32 i; 1658 1658 psS32 vecLen=x->n; … … 1714 1714 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL); 1715 1715 1716 psVector *tmp = NULL;1717 psVector *myX = NULL;1718 psVector *myY = NULL;1719 psVector *myZ = NULL;1716 psVector *tmp; 1717 psVector *myX; 1718 psVector *myY; 1719 psVector *myZ; 1720 1720 psS32 i; 1721 1721 psS32 vecLen=x->n; … … 1786 1786 PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL); 1787 1787 1788 psVector *tmp = NULL;1789 psVector *myW = NULL;1790 psVector *myX = NULL;1791 psVector *myY = NULL;1792 psVector *myZ = NULL;1788 psVector *tmp; 1789 psVector *myW; 1790 psVector *myX; 1791 psVector *myY; 1792 psVector *myZ; 1793 1793 psS32 i; 1794 1794 psS32 vecLen=x->n; -
trunk/psLib/src/math/psStats.c
r3355 r3374 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.11 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-03-0 1 22:21:34$11 * @version $Revision: 1.118 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-03-04 20:51:20 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1006 1006 1007 1007 XXX: Use static vectors for tmpMask. 1008 1009 XXX: This has not been tested. 1008 1010 *****************************************************************************/ 1009 1011 psS32 p_psVectorClippedStats(const psVector* myVector, … … 1016 1018 psF32 clippedStdev = 0.0; // self-explanatory 1017 1019 psVector* tmpMask = NULL; // Temporary vector for masks during iterations. 1018 psStats *statsTmp = NULL; // Temporary psStats struct.1020 static psStats *statsTmp = NULL; // Temporary psStats struct. 1019 1021 psS32 rc = 0; // Return code. 1020 1022 … … 1040 1042 // However, we do no want to modify the original mask vector. 1041 1043 tmpMask = psVectorAlloc(myVector->n, PS_TYPE_U8); 1044 PS_VECTOR_SET_U8(tmpMask, 0); 1042 1045 1043 1046 // If we were called with a mask vector, then initialize the temporary … … 1068 1071 1069 1072 // 3. Use the sample median as the first estimator of the mean X. 1070 clippedMean = statsTmp->sampleMe an;1073 clippedMean = statsTmp->sampleMedian; 1071 1074 1072 1075 // 4. Use the sample stdev as the first estimator of the mean stdev.
Note:
See TracChangeset
for help on using the changeset viewer.
