IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 25, 2006, 2:31:19 PM (20 years ago)
Author:
gusciora
Message:

Several mods mostly to the psPolynomial fitting routines.

File:
1 edited

Legend:

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

    r6186 r6193  
    1414 *      stats->binsize
    1515 *
    16  *
    17  *
    18  *
    19  *  @version $Revision: 1.160 $ $Name: not supported by cvs2svn $
    20  *  @date $Date: 2006-01-23 22:25:31 $
     16 *  @version $Revision: 1.161 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2006-01-26 00:31:19 $
    2118 *
    2219 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    574571    nValues = p_psVectorNValues(myVector, maskVector, maskVal, stats);
    575572
    576     // XXX: Is a warning message appropriate?  What value should we set the
    577     // sampleMedian to?  Should we generate an error?
    578573    if (nValues <= 0) {
    579574        psLogMsg(__func__, PS_LOG_WARN, "WARNING: p_psVectorSampleMedian(): no valid elements in input vector.\n");
     
    784779Returns
    785780    NULL
    786  
    787 XXX: Use static vectors.
    788781 *****************************************************************************/
    789782bool p_psVectorSampleQuartiles(const psVector* myVector,
     
    11331126        p_psMemSetPersistent(statsTmp, true);
    11341127    } else {
    1135         // XXX EAM : initialize structure if already allocated
     1128        // EAM : initialize structure if already allocated
    11361129        statsTmp->sampleMean = NAN;
    11371130        statsTmp->sampleMedian = NAN;
     
    12261219        // Otherwise, use the new results and continue.
    12271220        if (isnan(statsTmp->sampleMean) || isnan(statsTmp->sampleStdev)) {
    1228             // Exit loop.  XXX: Should we throw an error/warning here?
     1221            // Exit loop.  XXX: throw an error/warning here?
    12291222            iter = stats->clipIter;
    12301223            rc = -1;
     
    14871480        //
    14881481        // XXX: This routine should probably be rewritten in a more general fashion
    1489         // so that the folloiwng checks are not necessary.
     1482        // so that the following checks are not necessary.
    14901483        //
    14911484        if (y->data.F64[0] < y->data.F64[1]) {
     
    15911584    psTrace(__func__, 5, "---- %s(%f) end ----\n", __func__, tmpFloat);
    15921585    return(tmpFloat);
    1593 }
    1594 
    1595 /*****************************************************************************
    1596 XXX: Is there a psLib function for this?
    1597  *****************************************************************************/
    1598 psVector *PsVectorDup(psVector *in)
    1599 {
    1600     psTrace(__func__, 4, "---- %s() begin ----\n", __func__);
    1601     PS_ASSERT_VECTOR_NON_NULL(in, NULL);
    1602     psVector *out = psVectorAlloc(in->n, in->type.type);
    1603 
    1604     if (in->type.type == PS_TYPE_F32) {
    1605         for (psS32 i = 0 ; i < in->n ; i++) {
    1606             out->data.F32[i] = in->data.F32[i];
    1607         }
    1608     } else if (in->type.type == PS_TYPE_F64) {
    1609         for (psS32 i = 0 ; i < in->n ; i++) {
    1610             out->data.F64[i] = in->data.F64[i];
    1611         }
    1612     } else {
    1613         psError(PS_ERR_UNKNOWN, true, "Unallowable vector type.\n");
    1614         psTrace(__func__, 4, "---- %s(NULL) end ----\n", __func__);
    1615         return(NULL);
    1616     }
    1617     psTrace(__func__, 4, "---- %s(psVector) end ----\n", __func__);
    1618     return(out);
    16191586}
    16201587
     
    18321799        // ADD: Step 3.
    18331800        // Interpolate to the exact 50% position: this is the robust histogram median.
    1834         // XXX: Check for errors here!
     1801        // XXX: Check return codes.
    18351802        //
    18361803        stats->robustMedian = fitQuadraticSearchForYThenReturnX(
     
    26402607 
    26412608XXX: Should the default data type be F64?  Since we are buying Opterons...
     2609 
     2610XXX: Use psLib functions instead.
    26422611 *****************************************************************************/
    26432612psVector* p_psConvertToF32(psVector* in)
Note: See TracChangeset for help on using the changeset viewer.