IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9538 for trunk/psLib/src/math


Ignore:
Timestamp:
Oct 13, 2006, 11:13:48 AM (20 years ago)
Author:
Paul Price
Message:

Synchronising with SDRS, and cleaning up:

  • Replaced is_psType() with PS_ASSERT_PTR() throughout psLib.
  • Changed "char *" to "psString" where appropriate in psDB and a few other places (to indicate pointers on the PS memory system).
  • Removed psLogArguments and psTraceArguments (functionality in psArgumentVerbosity).
  • Renamed psMetadataLookupMD to psMetadataLookupMetadata (it was about time...). Similarly with the psPolynomial?D{From,To}MD functions.
  • Removed psMetadataRemove() since it is ambiguous about what's removed --- use psMetadataRemove{Key,Index}.
  • psArrayRemoveByPos --> psArrayRemoveIndex
  • psArrayRemove --> psArrayRemoveData
Location:
trunk/psLib/src/math
Files:
7 edited

Legend:

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

    r8627 r9538  
    2121 *  @author Robert DeSonia, MHPCC
    2222 *
    23  *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2006-08-26 04:34:28 $
     23 *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2006-10-13 21:13:48 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    308308// This is a temporary gauss-jordan solver based on gene's
    309309// version based on the Numerical Recipes version
    310 bool psMatrixGJSolve(
    311     psImage *a,
    312     psVector *b)
    313 {
     310bool psMatrixGJSolve(psImage *a,
     311                     psVector *b
     312                    )
     313{
     314    PS_ASSERT_IMAGE_NON_NULL(a, false);
     315    PS_ASSERT_VECTOR_NON_NULL(b, false);
     316    PS_ASSERT_IMAGE_TYPE(a, PS_TYPE_F64, false);
     317    PS_ASSERT_VECTOR_TYPE(b, PS_TYPE_F64, false);
     318    PS_ASSERT_INT_EQUAL(a->numCols, a->numRows, false);
     319    int Nx = a->numCols;
     320    PS_ASSERT_VECTOR_SIZE(b, (long int)Nx, false);
     321
    314322    psF64 *vector = b->data.F64;
    315323    psF64 **matrix = a->data.F64;
    316     int Nx = a->numCols;
    317324    int *indxc = psAlloc(Nx*sizeof(int));
    318325    int *indxr = psAlloc(Nx*sizeof(int));
  • trunk/psLib/src/math/psMatrix.h

    r7102 r9538  
    2121 *  @author Ross Harman, MHPCC
    2222 *
    23  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    24  *  @date $Date: 2006-05-10 00:49:38 $
     23 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     24 *  @date $Date: 2006-10-13 21:13:48 $
    2525 *
    2626 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6969 */
    7070bool psMatrixGJSolve(
    71     psImage *a,                        ///< Matrix to be solved
    72     psVector *b                        ///< Vector of values
     71    psImage *a,                   ///< Matrix to be solved
     72    psVector *b                   ///< Vector of values
    7373);
    7474
  • trunk/psLib/src/math/psMinimizeLMM.c

    r8627 r9538  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-08-26 04:34:28 $
     12 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-10-13 21:13:48 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    539539bool psMemCheckMinimization(psPtr ptr)
    540540{
    541     if (!is_psType(ptr)) {
    542         return false;
    543     }
     541    PS_ASSERT_PTR(ptr, false);
    544542    return( psMemGetDeallocator(ptr) == (psFreeFunc)minimizationFree );
    545543}
  • trunk/psLib/src/math/psPolynomial.c

    r8245 r9538  
    77*  polynomials.  It also contains a Gaussian functions.
    88*
    9 *  @version $Revision: 1.149 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-08-09 02:26:44 $
     9*  @version $Revision: 1.150 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-10-13 21:13:48 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6464bool psMemCheckPolynomial1D(psPtr ptr)
    6565{
    66     if (!is_psType(ptr)) {
    67         return false;
    68     }
     66    PS_ASSERT_PTR(ptr, false);
    6967    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial1DFree );
    7068}
     
    7270bool psMemCheckPolynomial2D(psPtr ptr)
    7371{
    74     if (!is_psType(ptr)) {
    75         return false;
    76     }
     72    PS_ASSERT_PTR(ptr, false);
    7773    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial2DFree );
    7874}
     
    8076bool psMemCheckPolynomial3D(psPtr ptr)
    8177{
    82     if (!is_psType(ptr)) {
    83         return false;
    84     }
     78    PS_ASSERT_PTR(ptr, false);
    8579    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial3DFree );
    8680}
     
    8882bool psMemCheckPolynomial4D(psPtr ptr)
    8983{
    90     if (!is_psType(ptr)) {
    91         return false;
    92     }
     84    PS_ASSERT_PTR(ptr, false);
    9385    return ( psMemGetDeallocator(ptr) == (psFreeFunc)polynomial4DFree );
    9486}
  • trunk/psLib/src/math/psRegion.c

    r8232 r9538  
    33#include "psMemory.h"
    44#include "psError.h"
    5 
     5#include "psAssert.h"
    66#include "psRegion.h"
    77
     
    109109bool psMemCheckRegion(psPtr ptr)
    110110{
    111     if (!is_psType(ptr)) {
    112         return false;
    113     }
     111    PS_ASSERT_PTR(ptr, false);
    114112    return ( psMemGetDeallocator(ptr) == (psFreeFunc)regionFree );
    115113}
  • trunk/psLib/src/math/psSpline.c

    r8627 r9538  
    66*  This file contains the routines that allocate, free, and evaluate splines.
    77*
    8 *  @version $Revision: 1.153 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2006-08-26 04:34:28 $
     8*  @version $Revision: 1.154 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2006-10-13 21:13:48 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    168168bool psMemCheckSpline1D(psPtr ptr)
    169169{
    170     if (!is_psType(ptr)) {
    171         return false;
    172     }
     170    PS_ASSERT_PTR(ptr, false);
    173171    return ( psMemGetDeallocator(ptr) == (psFreeFunc)spline1DFree );
    174172}
  • trunk/psLib/src/math/psStats.c

    r8627 r9538  
    1616 * use ->min and ->max (PS_STAT_USE_RANGE)
    1717 *
    18  *  @version $Revision: 1.185 $ $Name: not supported by cvs2svn $
    19  *  @date $Date: 2006-08-26 04:34:28 $
     18 *  @version $Revision: 1.186 $ $Name: not supported by cvs2svn $
     19 *  @date $Date: 2006-10-13 21:13:48 $
    2020 *
    2121 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    16231623bool psMemCheckStats(psPtr ptr)
    16241624{
    1625     if (!is_psType(ptr)) {
    1626         return false;
    1627     }
     1625    PS_ASSERT_PTR(ptr, false);
    16281626    return ( psMemGetDeallocator(ptr) == (psFreeFunc)statsFree );
    16291627}
     
    17341732bool psMemCheckHistogram(psPtr ptr)
    17351733{
    1736     if (!is_psType(ptr)) {
    1737         return false;
    1738     }
     1734    PS_ASSERT_PTR(ptr, false);
    17391735    return ( psMemGetDeallocator(ptr) == (psFreeFunc)histogramFree );
    17401736}
Note: See TracChangeset for help on using the changeset viewer.