IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 12, 2007, 5:01:24 PM (19 years ago)
Author:
Paul Price
Message:

Fixing bug 843 by modifying functions that (unnecessarily) returned an input to return a bool.

File:
1 edited

Legend:

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

    r11674 r11759  
    55 *  @author GLG (MHPCC), EAM (IfA)
    66 *
    7  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-02-07 01:15:49 $
     7 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-02-13 03:01:24 $
    99 *
    1010 *  Copyright 2006 IfA, University of Hawaii
     
    4646with the specifed upper and lower limits, and the specifed number of bins.
    4747This routine will also set the bounds for each of the bins.
    48  
     48
    4949Input:
    5050    lower
     
    9292psHistogramAllocGeneric(bounds): allocate a non-uniform histogram structure
    9393with the specifed bounds.
    94  
     94
    9595Input:
    9696    bounds
     
    144144histogram bin which contains the point.  The width of that boxcar is defined
    145145as 2.35 * error.
    146  
     146
    147147XXX: Must test this.
    148148 *****************************************************************************/
     
    218218in that histogram structure in accordance with the input data "in" and the,
    219219possibly NULL, mask vector.
    220  
     220
    221221Inputs:
    222222    out
     
    227227    The histogram structure "out".
    228228 *****************************************************************************/
    229 psHistogram* psVectorHistogram(psHistogram* out,
     229bool psVectorHistogram(psHistogram* out,
    230230                               const psVector* values,
    231231                               const psVector* errors,
     
    234234{
    235235    psTrace("psLib.math", 3, "---- %s() begin  ----\n", __func__);
    236     PS_ASSERT_PTR_NON_NULL(out, NULL);
    237     PS_ASSERT_VECTOR_NON_NULL(out->bounds, NULL);
    238     PS_ASSERT_VECTOR_TYPE(out->bounds, PS_TYPE_F32, NULL);
    239     PS_ASSERT_INT_NONNEGATIVE(out->bounds->n, NULL);
    240     PS_ASSERT_VECTOR_NON_NULL(out->nums, NULL);
    241     PS_ASSERT_VECTOR_TYPE(out->nums, PS_TYPE_F32, NULL);
    242     PS_ASSERT_INT_NONNEGATIVE(out->nums->n, NULL);
     236    PS_ASSERT_PTR_NON_NULL(out, false);
     237    PS_ASSERT_VECTOR_NON_NULL(out->bounds, false);
     238    PS_ASSERT_VECTOR_TYPE(out->bounds, PS_TYPE_F32, false);
     239    PS_ASSERT_INT_NONNEGATIVE(out->bounds->n, false);
     240    PS_ASSERT_VECTOR_NON_NULL(out->nums, false);
     241    PS_ASSERT_VECTOR_TYPE(out->nums, PS_TYPE_F32, false);
     242    PS_ASSERT_INT_NONNEGATIVE(out->nums->n, false);
    243243    PS_ASSERT_VECTOR_NON_NULL(values, out);
    244244    if (mask) {
    245         PS_ASSERT_VECTORS_SIZE_EQUAL(values, mask, NULL);
    246         PS_ASSERT_VECTOR_TYPE(mask, PS_TYPE_U8, NULL);
     245        PS_ASSERT_VECTORS_SIZE_EQUAL(values, mask, false);
     246        PS_ASSERT_VECTOR_TYPE(mask, PS_TYPE_U8, false);
    247247    }
    248248    if (errors) {
    249         PS_ASSERT_VECTORS_SIZE_EQUAL(values, errors, NULL);
    250         PS_ASSERT_VECTOR_TYPE(errors, values->type.type, NULL);
     249        PS_ASSERT_VECTORS_SIZE_EQUAL(values, errors, false);
     250        PS_ASSERT_VECTOR_TYPE(errors, values->type.type, false);
    251251    }
    252252
     
    329329
    330330    psTrace("psLib.math", 3, "---- %s() end  ----\n", __func__);
    331     return (out);
    332 }
    333 
     331    return true;
     332}
     333
Note: See TracChangeset for help on using the changeset viewer.