Changeset 4138 for trunk/psLib/src/math/psStats.c
- Timestamp:
- Jun 7, 2005, 1:11:54 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psStats.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psStats.c
r4101 r4138 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.130 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-03 22:30:20 $ 11 * XXX: The following stats members are never used, or set in this code. 12 * stats->robustN50 13 * stats->clippedNvalues 14 * stats->binsize 15 * 16 * @version $Revision: 1.131 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-06-07 23:11:54 $ 13 18 * 14 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1629 1634 (stats->options & PS_STAT_ROBUST_STDEV)) { 1630 1635 // We fit a 1-D polynomial to the data. 1636 // XXX: I implement the changes requested in bug 366. However, this 1637 // code no longer produces sensible results. 1631 1638 // XXX: Since we are no longer fitting a 1-D Gaussian, we can probably 1632 1639 // remove some of theabove code that calculated the initial estimate … … 1634 1641 1635 1642 psVector *y = psVectorAlloc(2 * dL + 1, PS_TYPE_F32); 1643 psVector *x = psVectorAlloc(2 * dL + 1, PS_TYPE_F32); 1636 1644 for (i = modeBinNum - dL; i <= modeBinNum + dL; i++) { 1637 1645 int index = i - modeBinNum + dL; … … 1639 1647 y->data.F32[index] = robustHistogramVector->data.F32[i]; 1640 1648 // y->data.F32[index] = logf(robustHistogramVector->data.F32[i]); 1649 x->data.F32[index] = (psF32) index; 1641 1650 } 1642 1651 … … 1659 1668 stats->robustStdev = polyFitSigma; 1660 1669 } 1670 // For testing only. This shows that the polynomial fit is successful. 1671 if (0) { 1672 printf("--- Results of the 1-D polynomial fit:\n"); 1673 for (i = modeBinNum - dL; i <= modeBinNum + dL; i++) { 1674 int index = i - modeBinNum + dL; 1675 printf("(x, y, poly(x)) is (%.2f, %.2f, %.2f)\n", 1676 x->data.F32[index], 1677 y->data.F32[index], 1678 psPolynomial1DEval(tmpPoly, x->data.F32[index])); 1679 } 1680 } 1681 1682 psFree(x); 1661 1683 psFree(y); 1662 1684 psFree(tmpPoly); … … 1750 1772 newStruct->robustUQ = NAN; 1751 1773 newStruct->robustLQ = NAN; 1752 newStruct->robustN50 = 0;1753 newStruct->robustNfit = 0;1774 newStruct->robustN50 = -1; // XXX: This is never used 1775 newStruct->robustNfit = -1; 1754 1776 newStruct->clippedMean = NAN; 1755 1777 newStruct->clippedStdev = NAN; 1778 newStruct->clippedNvalues = -1; // XXX: This is never used 1756 1779 newStruct->clipSigma = 3.0; 1757 newStruct->clipIter = 3 .0;1780 newStruct->clipIter = 3; 1758 1781 newStruct->min = NAN; 1759 1782 newStruct->max = NAN; 1760 newStruct->binsize = NAN; 1783 newStruct->binsize = NAN; // XXX: This is never used 1761 1784 newStruct->options = options; 1762 1785
Note:
See TracChangeset
for help on using the changeset viewer.
