Changeset 9540 for trunk/psLib/src/math
- Timestamp:
- Oct 13, 2006, 12:04:58 PM (20 years ago)
- Location:
- trunk/psLib/src/math
- Files:
-
- 6 edited
-
psMinimizeLMM.c (modified) (4 diffs)
-
psMinimizePolyFit.c (modified) (12 diffs)
-
psMinimizePowell.c (modified) (2 diffs)
-
psPolynomial.c (modified) (2 diffs)
-
psSpline.c (modified) (3 diffs)
-
psStats.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psMinimizeLMM.c
r9538 r9540 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-10-13 2 1:13:48 $12 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-10-13 22:04:58 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 409 409 } 410 410 // dump some useful info if trace is defined 411 if (psTraceGetLevel( __func__) >= 6) {411 if (psTraceGetLevel("psLib.math") >= 6) { 412 412 p_psImagePrint(psTraceGetDestination(), alpha, "alpha guess (0)"); 413 413 p_psVectorPrint(psTraceGetDestination(), beta, "beta guess (0)"); … … 438 438 439 439 // dump some useful info if trace is defined 440 if (psTraceGetLevel( __func__) >= 6) {440 if (psTraceGetLevel("psLib.math") >= 6) { 441 441 p_psImagePrint(psTraceGetDestination(), Alpha, "alpha guess (1)"); 442 442 p_psVectorPrint(psTraceGetDestination(), Beta, "beta guess (1)"); 443 443 p_psVectorPrint(psTraceGetDestination(), Params, "params guess (1)"); 444 444 } 445 if (psTraceGetLevel( __func__) >= 6) {445 if (psTraceGetLevel("psLib.math") >= 6) { 446 446 if (psTraceGetLevel (__func__) >= 6) { 447 447 psTrace("psLib.math", 6, "The current Param vector: \n"); … … 470 470 471 471 // dump some useful info if trace is defined 472 if (psTraceGetLevel( __func__) >= 6) {472 if (psTraceGetLevel("psLib.math") >= 6) { 473 473 p_psImagePrint(psTraceGetDestination(), Alpha, "alpha guess (2)"); 474 474 p_psVectorPrint(psTraceGetDestination(), Beta, "beta guess (2)"); -
trunk/psLib/src/math/psMinimizePolyFit.c
r8627 r9540 10 10 * @author EAM, IfA 11 11 * 12 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2006- 08-26 04:34:28 $12 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-10-13 22:04:58 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 397 397 psFree(sums); 398 398 399 if (psTraceGetLevel( __func__) >= 6) {399 if (psTraceGetLevel("psLib.math") >= 6) { 400 400 PS_IMAGE_PRINT_F64(A); 401 401 PS_VECTOR_PRINT_F64(B); … … 487 487 } 488 488 489 if (psTraceGetLevel( __func__) >= 6) {489 if (psTraceGetLevel("psLib.math") >= 6) { 490 490 psTrace("psLib.math", 6, "VectorFitPolynomial1D()\n"); 491 491 for (psS32 i = 0; i < f->n; i++) { … … 579 579 psFree(xSums); 580 580 581 if (psTraceGetLevel( __func__) >= 4) {581 if (psTraceGetLevel("psLib.math") >= 4) { 582 582 printf("Least-squares vector:\n"); 583 583 for (int i = 0; i < nTerm; i++) { … … 818 818 psTrace("psLib.math", 6, "Loop iteration %d. Calling psVectorFitPolynomial1D()\n", N); 819 819 psS32 Nkeep = 0; 820 if (psTraceGetLevel( __func__) >= 6) {820 if (psTraceGetLevel("psLib.math") >= 6) { 821 821 if (mask != NULL) { 822 822 for (psS32 i = 0 ; i < mask->n ; i++) { … … 847 847 } 848 848 } 849 if (psTraceGetLevel( __func__) >= 6) {849 if (psTraceGetLevel("psLib.math") >= 6) { 850 850 if (mask != NULL) { 851 851 for (psS32 i = 0 ; i < mask->n ; i++) { … … 1252 1252 psTrace("psLib.math", 6, "Loop iteration %d. Calling psVectorFitPolynomial1D()\n", N); 1253 1253 psS32 Nkeep = 0; 1254 if (psTraceGetLevel( __func__) >= 6) {1254 if (psTraceGetLevel("psLib.math") >= 6) { 1255 1255 if (mask != NULL) { 1256 1256 for (psS32 i = 0 ; i < mask->n ; i++) { … … 1282 1282 } 1283 1283 1284 if (psTraceGetLevel( __func__) >= 6) {1284 if (psTraceGetLevel("psLib.math") >= 6) { 1285 1285 if (mask != NULL) { 1286 1286 for (psS32 i = 0 ; i < mask->n ; i++) { … … 1772 1772 psTrace("psLib.math", 6, "Loop iteration %d. Calling psVectorFitPolynomial1D()\n", N); 1773 1773 psS32 Nkeep = 0; 1774 if (psTraceGetLevel( __func__) >= 6) {1774 if (psTraceGetLevel("psLib.math") >= 6) { 1775 1775 if (mask != NULL) { 1776 1776 for (psS32 i = 0 ; i < mask->n ; i++) { … … 1801 1801 } 1802 1802 1803 if (psTraceGetLevel( __func__) >= 6) {1803 if (psTraceGetLevel("psLib.math") >= 6) { 1804 1804 if (mask != NULL) { 1805 1805 for (psS32 i = 0 ; i < mask->n ; i++) { … … 2340 2340 psTrace("psLib.math", 6, "Loop iteration %d. Calling psVectorFitPolynomial4D()\n", N); 2341 2341 psS32 Nkeep = 0; 2342 if (psTraceGetLevel( __func__) >= 6) {2342 if (psTraceGetLevel("psLib.math") >= 6) { 2343 2343 if (mask != NULL) { 2344 2344 for (psS32 i = 0 ; i < mask->n ; i++) { … … 2370 2370 } 2371 2371 2372 if (psTraceGetLevel( __func__) >= 6) {2372 if (psTraceGetLevel("psLib.math") >= 6) { 2373 2373 if (mask != NULL) { 2374 2374 for (psS32 i = 0 ; i < mask->n ; i++) { -
trunk/psLib/src/math/psMinimizePowell.c
r8245 r9540 11 11 * NOTE: XXX: The SDR is silent about data types. F32 is implemented here. 12 12 * 13 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2006- 08-09 02:26:44$13 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-10-13 22:04:58 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 380 380 } 381 381 382 if (6 <= psTraceGetLevel( __func__)) {382 if (6 <= psTraceGetLevel("psLib.math")) { 383 383 for (i=0;i<params->n;i++) { 384 384 psTrace("psLib.math", 6, "(params, paramMask, line)[%d] is (%f %d %f)\n", i, -
trunk/psLib/src/math/psPolynomial.c
r9538 r9540 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.15 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-10-13 2 1:13:48 $9 * @version $Revision: 1.151 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-10-13 22:04:58 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 189 189 } 190 190 191 if (psTraceGetLevel( __func__) >= 6) {191 if (psTraceGetLevel("psLib.math") >= 6) { 192 192 for (psS32 j = 0; j < numPolys; j++) { 193 193 PS_POLY_PRINT_1D(chebPolys[j]); -
trunk/psLib/src/math/psSpline.c
r9538 r9540 6 6 * This file contains the routines that allocate, free, and evaluate splines. 7 7 * 8 * @version $Revision: 1.15 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2006-10-13 2 1:13:48 $8 * @version $Revision: 1.155 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2006-10-13 22:04:58 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 120 120 { 121 121 psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__); 122 if (psTraceGetLevel( __func__) >= 6) {122 if (psTraceGetLevel("psLib.math") >= 6) { 123 123 p_psVectorPrint(1, (psVector *) x, "x"); 124 124 p_psVectorPrint(1, (psVector *) y, "y"); … … 406 406 PS_ASSERT_VECTOR_NON_NULL(x, NULL); 407 407 PS_ASSERT_VECTOR_TYPE_F32_OR_F64(x, NULL); 408 if (psTraceGetLevel( __func__) >= 6) {408 if (psTraceGetLevel("psLib.math") >= 6) { 409 409 PS_VECTOR_PRINT_F32(x); 410 410 PS_PRINT_SPLINE2((psSpline1D *) spline); -
trunk/psLib/src/math/psStats.c
r9538 r9540 16 16 * use ->min and ->max (PS_STAT_USE_RANGE) 17 17 * 18 * @version $Revision: 1.18 6$ $Name: not supported by cvs2svn $19 * @date $Date: 2006-10-13 2 1:13:48 $18 * @version $Revision: 1.187 $ $Name: not supported by cvs2svn $ 19 * @date $Date: 2006-10-13 22:04:58 $ 20 20 * 21 21 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 480 480 PS_ASSERT_PTR_NON_NULL(histogram->bounds, NULL); 481 481 PS_ASSERT_PTR_NON_NULL(histogram->nums, NULL); 482 if (psTraceGetLevel( __func__) >= 8) {482 if (psTraceGetLevel("psLib.math") >= 8) { 483 483 PS_VECTOR_PRINT_F32(histogram->nums); 484 484 } … … 561 561 } 562 562 563 if (psTraceGetLevel( __func__) >= 8) {563 if (psTraceGetLevel("psLib.math") >= 8) { 564 564 PS_VECTOR_PRINT_F32(smooth); 565 565 } … … 705 705 { 706 706 psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__); 707 psTrace("psLib.math", 4, "Trace level is %d\n", psTraceGetLevel( __func__));707 psTrace("psLib.math", 4, "Trace level is %d\n", psTraceGetLevel("psLib.math")); 708 708 709 709 // Ensure that stats->clipIter is within the proper range. … … 886 886 psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__); 887 887 psTrace("psLib.math", 5, "binNum, yVal is (%d, %f)\n", binNum, yVal); 888 if (psTraceGetLevel( __func__) >= 8) {888 if (psTraceGetLevel("psLib.math") >= 8) { 889 889 PS_VECTOR_PRINT_F32(xVec); 890 890 PS_VECTOR_PRINT_F32(yVec); … … 1058 1058 { 1059 1059 psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__); 1060 if (psTraceGetLevel( __func__) >= 8) {1060 if (psTraceGetLevel("psLib.math") >= 8) { 1061 1061 PS_VECTOR_PRINT_F32(myVector); 1062 1062 } … … 1141 1141 histogram = psHistogramAlloc(min, max, numBins); 1142 1142 histogram = psVectorHistogram(histogram, myVector, errors, mask, maskVal); 1143 if (psTraceGetLevel( __func__) >= 8) {1143 if (psTraceGetLevel("psLib.math") >= 8) { 1144 1144 PS_VECTOR_PRINT_F32(histogram->bounds); 1145 1145 PS_VECTOR_PRINT_F32(histogram->nums); … … 1152 1152 cumulative->nums->data.F32[i] = cumulative->nums->data.F32[i-1] + histogram->nums->data.F32[i]; 1153 1153 } 1154 if (psTraceGetLevel( __func__) >= 8) {1154 if (psTraceGetLevel("psLib.math") >= 8) { 1155 1155 PS_VECTOR_PRINT_F32(cumulative->bounds); 1156 1156 PS_VECTOR_PRINT_F32(cumulative->nums); … … 1417 1417 psHistogram *histogram = psHistogramAlloc(min, max, numBins); // A new histogram (without outliers) 1418 1418 histogram = psVectorHistogram(histogram, myVector, errors, mask, maskVal); 1419 if (psTraceGetLevel( __func__) >= 8) {1419 if (psTraceGetLevel("psLib.math") >= 8) { 1420 1420 PS_VECTOR_PRINT_F32(histogram->nums); 1421 1421 } … … 1423 1423 // Smooth the resulting histogram with a Gaussian with sigma_s = 1 bin. 1424 1424 psVector *smoothed = vectorSmoothHistGaussian(histogram, newBinSize); // Smoothed histogram 1425 if (psTraceGetLevel( __func__) >= 8) {1425 if (psTraceGetLevel("psLib.math") >= 8) { 1426 1426 PS_VECTOR_PRINT_F32(smoothed); 1427 1427 } … … 1496 1496 x->data[j] = ordinate; 1497 1497 } 1498 if (psTraceGetLevel( __func__) >= 8) {1498 if (psTraceGetLevel("psLib.math") >= 8) { 1499 1499 // XXX: Print the x array somehow. 1500 1500 PS_VECTOR_PRINT_F32(y); … … 1525 1525 params->data.F32[0] = stats->robustMedian; 1526 1526 params->data.F32[1] = sigma; 1527 if (psTraceGetLevel( __func__) >= 8) {1527 if (psTraceGetLevel("psLib.math") >= 8) { 1528 1528 PS_VECTOR_PRINT_F32(params); 1529 1529 PS_VECTOR_PRINT_F32(y); … … 1540 1540 return false; 1541 1541 } 1542 if (psTraceGetLevel( __func__) >= 8) {1542 if (psTraceGetLevel("psLib.math") >= 8) { 1543 1543 PS_VECTOR_PRINT_F32(params); 1544 1544 }
Note:
See TracChangeset
for help on using the changeset viewer.
