IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3374


Ignore:
Timestamp:
Mar 4, 2005, 10:51:20 AM (21 years ago)
Author:
gusciora
Message:

...

Location:
trunk/psLib/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psFunctions.c

    r3264 r3374  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.89 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-17 19:26:23 $
     9 *  @version $Revision: 1.90 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-03-04 20:51:20 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    12061206    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL);
    12071207
    1208     psVector *tmp = NULL;
    1209     psVector *myX = NULL;
     1208    psVector *tmp;
     1209    psVector *myX;
    12101210    psS32 i;
    12111211
     
    12481248    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NULL);
    12491249
    1250     psVector *tmp = NULL;
    1251     psVector *myX = NULL;
    1252     psVector *myY = NULL;
     1250    psVector *tmp;
     1251    psVector *myX;
     1252    psVector *myY;
    12531253    psS32 i;
    12541254    psS32 vecLen=x->n;
     
    13061306    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL);
    13071307
    1308     psVector *tmp = NULL;
    1309     psVector *myX = NULL;
    1310     psVector *myY = NULL;
    1311     psVector *myZ = NULL;
     1308    psVector *tmp;
     1309    psVector *myX;
     1310    psVector *myY;
     1311    psVector *myZ;
    13121312    psS32 i;
    13131313    psS32 vecLen=x->n;
     
    13741374    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL);
    13751375
    1376     psVector *tmp = NULL;
    1377     psVector *myW = NULL;
    1378     psVector *myX = NULL;
    1379     psVector *myY = NULL;
    1380     psVector *myZ = NULL;
     1376    psVector *tmp;
     1377    psVector *myW;
     1378    psVector *myX;
     1379    psVector *myY;
     1380    psVector *myZ;
    13811381    psS32 i;
    13821382    psS32 vecLen=x->n;
     
    16071607    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F64, NULL);
    16081608
    1609     psVector *tmp = NULL;
    1610     psVector *myX = NULL;
     1609    psVector *tmp;
     1610    psVector *myX;
    16111611    psS32 i;
    16121612
     
    16521652    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F64, NULL);
    16531653
    1654     psVector *tmp = NULL;
    1655     psVector *myX = NULL;
    1656     psVector *myY = NULL;
     1654    psVector *tmp;
     1655    psVector *myX;
     1656    psVector *myY;
    16571657    psS32 i;
    16581658    psS32 vecLen=x->n;
     
    17141714    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL);
    17151715
    1716     psVector *tmp = NULL;
    1717     psVector *myX = NULL;
    1718     psVector *myY = NULL;
    1719     psVector *myZ = NULL;
     1716    psVector *tmp;
     1717    psVector *myX;
     1718    psVector *myY;
     1719    psVector *myZ;
    17201720    psS32 i;
    17211721    psS32 vecLen=x->n;
     
    17861786    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL);
    17871787
    1788     psVector *tmp = NULL;
    1789     psVector *myW = NULL;
    1790     psVector *myX = NULL;
    1791     psVector *myY = NULL;
    1792     psVector *myZ = NULL;
     1788    psVector *tmp;
     1789    psVector *myW;
     1790    psVector *myX;
     1791    psVector *myY;
     1792    psVector *myZ;
    17931793    psS32 i;
    17941794    psS32 vecLen=x->n;
  • trunk/psLib/src/dataManip/psStats.c

    r3355 r3374  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.117 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-03-01 22:21:34 $
     11 *  @version $Revision: 1.118 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-03-04 20:51:20 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    10061006 
    10071007XXX: Use static vectors for tmpMask.
     1008 
     1009XXX: This has not been tested.
    10081010 *****************************************************************************/
    10091011psS32 p_psVectorClippedStats(const psVector* myVector,
     
    10161018    psF32 clippedStdev = 0.0;   // self-explanatory
    10171019    psVector* tmpMask = NULL;   // Temporary vector for masks during iterations.
    1018     psStats *statsTmp = NULL;   // Temporary psStats struct.
     1020    static psStats *statsTmp = NULL;   // Temporary psStats struct.
    10191021    psS32 rc = 0;               // Return code.
    10201022
     
    10401042    // However, we do no want to modify the original mask vector.
    10411043    tmpMask = psVectorAlloc(myVector->n, PS_TYPE_U8);
     1044    PS_VECTOR_SET_U8(tmpMask, 0);
    10421045
    10431046    // If we were called with a mask vector, then initialize the temporary
     
    10681071
    10691072    // 3. Use the sample median as the first estimator of the mean X.
    1070     clippedMean = statsTmp->sampleMean;
     1073    clippedMean = statsTmp->sampleMedian;
    10711074
    10721075    // 4. Use the sample stdev as the first estimator of the mean stdev.
  • trunk/psLib/src/math/psPolynomial.c

    r3264 r3374  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.89 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-17 19:26:23 $
     9 *  @version $Revision: 1.90 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-03-04 20:51:20 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    12061206    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL);
    12071207
    1208     psVector *tmp = NULL;
    1209     psVector *myX = NULL;
     1208    psVector *tmp;
     1209    psVector *myX;
    12101210    psS32 i;
    12111211
     
    12481248    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NULL);
    12491249
    1250     psVector *tmp = NULL;
    1251     psVector *myX = NULL;
    1252     psVector *myY = NULL;
     1250    psVector *tmp;
     1251    psVector *myX;
     1252    psVector *myY;
    12531253    psS32 i;
    12541254    psS32 vecLen=x->n;
     
    13061306    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL);
    13071307
    1308     psVector *tmp = NULL;
    1309     psVector *myX = NULL;
    1310     psVector *myY = NULL;
    1311     psVector *myZ = NULL;
     1308    psVector *tmp;
     1309    psVector *myX;
     1310    psVector *myY;
     1311    psVector *myZ;
    13121312    psS32 i;
    13131313    psS32 vecLen=x->n;
     
    13741374    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL);
    13751375
    1376     psVector *tmp = NULL;
    1377     psVector *myW = NULL;
    1378     psVector *myX = NULL;
    1379     psVector *myY = NULL;
    1380     psVector *myZ = NULL;
     1376    psVector *tmp;
     1377    psVector *myW;
     1378    psVector *myX;
     1379    psVector *myY;
     1380    psVector *myZ;
    13811381    psS32 i;
    13821382    psS32 vecLen=x->n;
     
    16071607    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F64, NULL);
    16081608
    1609     psVector *tmp = NULL;
    1610     psVector *myX = NULL;
     1609    psVector *tmp;
     1610    psVector *myX;
    16111611    psS32 i;
    16121612
     
    16521652    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F64, NULL);
    16531653
    1654     psVector *tmp = NULL;
    1655     psVector *myX = NULL;
    1656     psVector *myY = NULL;
     1654    psVector *tmp;
     1655    psVector *myX;
     1656    psVector *myY;
    16571657    psS32 i;
    16581658    psS32 vecLen=x->n;
     
    17141714    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL);
    17151715
    1716     psVector *tmp = NULL;
    1717     psVector *myX = NULL;
    1718     psVector *myY = NULL;
    1719     psVector *myZ = NULL;
     1716    psVector *tmp;
     1717    psVector *myX;
     1718    psVector *myY;
     1719    psVector *myZ;
    17201720    psS32 i;
    17211721    psS32 vecLen=x->n;
     
    17861786    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL);
    17871787
    1788     psVector *tmp = NULL;
    1789     psVector *myW = NULL;
    1790     psVector *myX = NULL;
    1791     psVector *myY = NULL;
    1792     psVector *myZ = NULL;
     1788    psVector *tmp;
     1789    psVector *myW;
     1790    psVector *myX;
     1791    psVector *myY;
     1792    psVector *myZ;
    17931793    psS32 i;
    17941794    psS32 vecLen=x->n;
  • trunk/psLib/src/math/psSpline.c

    r3264 r3374  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.89 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-17 19:26:23 $
     9 *  @version $Revision: 1.90 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-03-04 20:51:20 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    12061206    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F32, NULL);
    12071207
    1208     psVector *tmp = NULL;
    1209     psVector *myX = NULL;
     1208    psVector *tmp;
     1209    psVector *myX;
    12101210    psS32 i;
    12111211
     
    12481248    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F32, NULL);
    12491249
    1250     psVector *tmp = NULL;
    1251     psVector *myX = NULL;
    1252     psVector *myY = NULL;
     1250    psVector *tmp;
     1251    psVector *myX;
     1252    psVector *myY;
    12531253    psS32 i;
    12541254    psS32 vecLen=x->n;
     
    13061306    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL);
    13071307
    1308     psVector *tmp = NULL;
    1309     psVector *myX = NULL;
    1310     psVector *myY = NULL;
    1311     psVector *myZ = NULL;
     1308    psVector *tmp;
     1309    psVector *myX;
     1310    psVector *myY;
     1311    psVector *myZ;
    13121312    psS32 i;
    13131313    psS32 vecLen=x->n;
     
    13741374    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F32, NULL);
    13751375
    1376     psVector *tmp = NULL;
    1377     psVector *myW = NULL;
    1378     psVector *myX = NULL;
    1379     psVector *myY = NULL;
    1380     psVector *myZ = NULL;
     1376    psVector *tmp;
     1377    psVector *myW;
     1378    psVector *myX;
     1379    psVector *myY;
     1380    psVector *myZ;
    13811381    psS32 i;
    13821382    psS32 vecLen=x->n;
     
    16071607    PS_VECTOR_CHECK_TYPE(x, PS_TYPE_F64, NULL);
    16081608
    1609     psVector *tmp = NULL;
    1610     psVector *myX = NULL;
     1609    psVector *tmp;
     1610    psVector *myX;
    16111611    psS32 i;
    16121612
     
    16521652    PS_VECTOR_CHECK_TYPE(y, PS_TYPE_F64, NULL);
    16531653
    1654     psVector *tmp = NULL;
    1655     psVector *myX = NULL;
    1656     psVector *myY = NULL;
     1654    psVector *tmp;
     1655    psVector *myX;
     1656    psVector *myY;
    16571657    psS32 i;
    16581658    psS32 vecLen=x->n;
     
    17141714    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL);
    17151715
    1716     psVector *tmp = NULL;
    1717     psVector *myX = NULL;
    1718     psVector *myY = NULL;
    1719     psVector *myZ = NULL;
     1716    psVector *tmp;
     1717    psVector *myX;
     1718    psVector *myY;
     1719    psVector *myZ;
    17201720    psS32 i;
    17211721    psS32 vecLen=x->n;
     
    17861786    PS_VECTOR_CHECK_TYPE(z, PS_TYPE_F64, NULL);
    17871787
    1788     psVector *tmp = NULL;
    1789     psVector *myW = NULL;
    1790     psVector *myX = NULL;
    1791     psVector *myY = NULL;
    1792     psVector *myZ = NULL;
     1788    psVector *tmp;
     1789    psVector *myW;
     1790    psVector *myX;
     1791    psVector *myY;
     1792    psVector *myZ;
    17931793    psS32 i;
    17941794    psS32 vecLen=x->n;
  • trunk/psLib/src/math/psStats.c

    r3355 r3374  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.117 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-03-01 22:21:34 $
     11 *  @version $Revision: 1.118 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-03-04 20:51:20 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    10061006 
    10071007XXX: Use static vectors for tmpMask.
     1008 
     1009XXX: This has not been tested.
    10081010 *****************************************************************************/
    10091011psS32 p_psVectorClippedStats(const psVector* myVector,
     
    10161018    psF32 clippedStdev = 0.0;   // self-explanatory
    10171019    psVector* tmpMask = NULL;   // Temporary vector for masks during iterations.
    1018     psStats *statsTmp = NULL;   // Temporary psStats struct.
     1020    static psStats *statsTmp = NULL;   // Temporary psStats struct.
    10191021    psS32 rc = 0;               // Return code.
    10201022
     
    10401042    // However, we do no want to modify the original mask vector.
    10411043    tmpMask = psVectorAlloc(myVector->n, PS_TYPE_U8);
     1044    PS_VECTOR_SET_U8(tmpMask, 0);
    10421045
    10431046    // If we were called with a mask vector, then initialize the temporary
     
    10681071
    10691072    // 3. Use the sample median as the first estimator of the mean X.
    1070     clippedMean = statsTmp->sampleMean;
     1073    clippedMean = statsTmp->sampleMedian;
    10711074
    10721075    // 4. Use the sample stdev as the first estimator of the mean stdev.
Note: See TracChangeset for help on using the changeset viewer.