IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17565


Ignore:
Timestamp:
May 7, 2008, 1:11:30 PM (18 years ago)
Author:
eugene
Message:

for a histogram, value is in bin i if bound[i] <= value < bound[i]; made code consistent with this definition

File:
1 edited

Legend:

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

    r15045 r17565  
    55 *  @author GLG (MHPCC), EAM (IfA)
    66 *
    7  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-09-28 00:34:11 $
     7 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2008-05-07 23:11:30 $
    99 *
    1010 *  Copyright 2006 IfA, University of Hawaii
     
    290290                    binNum = PS_MIN (binNum, numBins - 1);
    291291
     292                    // value is in bin 'i' if bound[i] <= value < bound[i]
     293
    292294                    // we may slightly overshoot or undershoot.  creep up or down on the true bin
    293295                    if (inF32->data.F32[i] < out->bounds->data.F32[binNum]) {
     
    298300                       
    299301                    }
    300                     if (inF32->data.F32[i] > out->bounds->data.F32[binNum+1]) {
     302                    if (inF32->data.F32[i] >= out->bounds->data.F32[binNum+1]) {
    301303                        psTrace("psLib.math", 6, "missed target bin, adjusting: %f vs %f to %f\n", inF32->data.F32[i], out->bounds->data.F32[binNum], out->bounds->data.F32[binNum+1]);
    302                         while ((inF32->data.F32[i] > out->bounds->data.F32[binNum+1]) && (binNum < numBins - 1)) {
     304                        while ((inF32->data.F32[i] >= out->bounds->data.F32[binNum+1]) && (binNum < numBins - 1)) {
    303305                            binNum ++;
    304306                        }
Note: See TracChangeset for help on using the changeset viewer.