IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2005, 9:12:01 AM (21 years ago)
Author:
desonia
Message:

massive restructuring of codebase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psStats.c

    r4409 r4540  
    1414 *      stats->binsize
    1515 *
    16  *  @version $Revision: 1.136 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2005-06-28 20:17:52 $
     16 *  @version $Revision: 1.137 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2005-07-12 19:12:01 $
    1818 *
    1919 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4141#include "psConstants.h"
    4242
    43 #include "psDataManipErrors.h"
     43#include "psErrorText.h"
    4444
    4545/*****************************************************************************/
     
    7777psBool p_psGetStatValue(const psStats* stats, psF64 *value)
    7878{
    79     switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
     79    //    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
     80    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE)) {
    8081    case PS_STAT_SAMPLE_MEAN:
    8182        *value = stats->sampleMean;
     
    658659        x.data.F32 = iMid - (PS_GAUSS_WIDTH * sigma);
    659660        if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) {
    660             jMin = p_psVectorBinDisect(robustHistogram->bounds, &x);
     661            jMin = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x);
    661662            if (jMin < 0) {
    662663                psError(PS_ERR_UNEXPECTED_NULL,
     
    673674        x.data.F32 = iMid + (PS_GAUSS_WIDTH * sigma);
    674675        if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) {
    675             jMax = p_psVectorBinDisect(robustHistogram->bounds, &x);
     676            jMax = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x);
    676677            if (jMax < 0) {
    677678                psError(PS_ERR_UNEXPECTED_NULL,
     
    17051706        //Determine id that is okay.
    17061707        stats->robustMedian = fitQuadraticSearchForYThenReturnX(
    1707                                   robustHistogram->bounds,
     1708                                  *(psVector* *)&robustHistogram->bounds,
    17081709                                  cumulativeRobustSums,
    17091710                                  medianBinNum,
     
    17211722        //Determine id that is okay.
    17221723        stats->robustLQ = fitQuadraticSearchForYThenReturnX(
    1723                               robustHistogram->bounds,
     1724                              *(psVector* *)&robustHistogram->bounds,
    17241725                              cumulativeRobustSums,
    17251726                              LQBinNum,
     
    17281729        //Determine id that is okay.
    17291730        stats->robustUQ = fitQuadraticSearchForYThenReturnX(
    1730                               robustHistogram->bounds,
     1731                              *(psVector* *)&robustHistogram->bounds,
    17311732                              cumulativeRobustSums,
    17321733                              UQBinNum,
     
    18121813    psMemSetDeallocator(newHist, (psFreeFunc) histogramFree);
    18131814    newHist->bounds = psVectorAlloc(n + 1, PS_TYPE_F32);
    1814     newHist->bounds->n = newHist->bounds->nalloc;
     1815    *(int *)&newHist->bounds->n = newHist->bounds->nalloc;
    18151816
    18161817    // Calculate the bounds for each bin.
     
    18591860    psMemSetDeallocator(newHist, (psFreeFunc) histogramFree);
    18601861    newHist->bounds = psVectorAlloc(bounds->n, PS_TYPE_F32);
    1861     newHist->bounds->n = newHist->bounds->nalloc;
     1862    *(int *)&newHist->bounds->n = newHist->bounds->nalloc;
    18621863    for (i = 0; i < bounds->n; i++) {
    18631864        newHist->bounds->data.F32[i] = bounds->data.F32[i];
     
    20672068                    // correct bin number requires a bit more work.
    20682069                    tmpScalar.data.F32 = inF32->data.F32[i];
    2069                     binNum = p_psVectorBinDisect(out->bounds, &tmpScalar);
     2070                    binNum = p_psVectorBinDisect( *(psVector* *)&out->bounds, &tmpScalar);
    20702071                    if (binNum < 0) {
    20712072                        psLogMsg(__func__, PS_LOG_WARN,
Note: See TracChangeset for help on using the changeset viewer.