IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 373


Ignore:
Timestamp:
Apr 1, 2004, 12:09:15 AM (22 years ago)
Author:
eugene
Message:

minor name & doxygen edits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psStdArrays.h

    r344 r373  
    7474typedef struct {
    7575    psType type;                        ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
    76     int size;                           ///< Total number of elements available
     76    int nalloc;                         ///< Total number of elements available
    7777    int n;                              ///< Number of elements in use
    7878    float *arr;                         ///< The array data
     
    8080
    8181/** Constructor \ingroup DataGroup */
    82 psFloatArray *psFloatArrayAlloc(int s,  ///< Total number of elements to make available
    83                                 int n   ///< Number of elements that will be used
    84     );
     82psFloatArray *psFloatArrayAlloc(int nalloc)     ///< Total number of elements to make available
     83;
     84
    8585/** Reallocator \ingroup DataGroup */
    8686psFloatArray *psFloatArrayRealloc(psFloatArray *myArray, ///< Array to reallocate
    87                                   int s ///< Total number of elements to make available
    88     );
    89 /** Destructor \ingroup DataGroup */
    90 void psFloatArrayFree(psFloatArray *restrict myArray ///< Array to free
    91     );
     87                                  int nalloc) ///< Total number of elements to make available
     88;
     89
     90/** Destructor \ingroup DataGroup */
     91void psFloatArrayFree(psFloatArray *restrict myArray) ///< Array to free
     92;
    9293
    9394/************************************************************************************************************/
     
    9596/** Define a vector as an array of real numbers */
    9697typedef psFloatArray psVector;
    97 #define psVectorAlloc(S,N) psFloatArrayAlloc(S,N) ///< Constructor
    98 #define psVectorRealloc(A,S) psFloatArrayRealloc(A,S) ///< Reallocator
     98#define psVectorAlloc(N) psFloatArrayAlloc(N) ///< Constructor
     99#define psVectorRealloc(A,N) psFloatArrayRealloc(A,N) ///< Reallocator
    99100#define psVectorFree(A) psFloatArrayFree(A) ///< Destructor
    100101
    101102/** Transpose a vector.  Changes the type to a PS_DIMEN_TRANSV */
    102103psVector *psVectorTranspose(psVector *out, ///< Output vector, or NULL
    103                             psVector *myVector ///< Vector to be transposed
    104     );
     104                            psVector *myVector) ///< Vector to be transposed
     105;
    105106
    106107/************************************************************************************************************/
     
    109110typedef struct {
    110111    psType type;                        ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
    111     int size;                           ///< Total number of elements available
     112    int nalloc;                         ///< Total number of elements available
    112113    int n;                              ///< Number of elements in use
    113114    complex float *arr;                 ///< The array data
     
    115116
    116117/** Constructor \ingroup DataGroup */
    117 psComplexArray *psComplexArrayAlloc(int s, ///< Total number of elements to make available
    118                                     int n       ///< Number of elements that will be used
    119     );
     118psComplexArray *psComplexArrayAlloc(int nalloc) ///< Total number of elements to make available
     119;
     120
    120121/** Reallocator \ingroup DataGroup */
    121122psComplexArray *psComplexArrayRealloc(psComplexArray *myArray, ///< Array to reallocate
    122                                       int s     ///< Total number of elements to make available
    123     );
    124 /** Destructor \ingroup DataGroup */
    125 void psComplexArrayFree(psComplexArray *restrict myArray ///< Array to free
    126     );
     123                                      int nalloc)       ///< Total number of elements to make available
     124;
     125
     126/** Destructor \ingroup DataGroup */
     127void psComplexArrayFree(psComplexArray *restrict myArray) ///< Array to free
     128;
    127129
    128130/************************************************************************************************************/
     
    131133typedef struct {
    132134    psType type;                        ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
    133     int size;                           ///< Total number of elements available
     135    int nalloc;                         ///< Total number of elements available
    134136    int n;                              ///< Number of elements in use
    135137    int *arr;                           ///< The array data
     
    137139
    138140/** Constructor \ingroup DataGroup */
    139 psIntArray *psIntArrayAlloc(int s,      ///< Total number of elements to make available
    140                             int n       ///< Number of elements that will be used
    141     );
     141psIntArray *psIntArrayAlloc(int nalloc) ///< Total number of elements to make available
     142;
     143
    142144/** Reallocator \ingroup DataGroup */
    143145psIntArray *psIntArrayRealloc(psIntArray *myArray, ///< Array to reallocate
    144                               int s     ///< Total number of elements to make available
    145     );
    146 /** Destructor \ingroup DataGroup */
    147 void psIntArrayFree(psIntArray *restrict myArray ///< Array to free
    148     );
     146                              int nalloc)       ///< Total number of elements to make available
     147;
     148
     149/** Destructor \ingroup DataGroup */
     150void psIntArrayFree(psIntArray *restrict myArray) ///< Array to free
     151;
    149152
    150153/************************************************************************************************************/
     
    153156typedef struct {
    154157    psType type;                        ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
    155     int size;                           ///< Total number of elements available
     158    int nalloc;                         ///< Total number of elements available
    156159    int n;                              ///< Number of elements in use
    157160    double *arr;                        ///< The array data
     
    159162
    160163/** Constructor \ingroup DataGroup */
    161 psDoubleArray *psDoubleArrayAlloc(int s, ///< Total number of elements to make available
    162                                   int n ///< Number of elements that will be used
    163     );
     164psDoubleArray *psDoubleArrayAlloc(int nalloc) ///< Total number of elements to make available
     165;
     166
    164167/** Reallocator \ingroup DataGroup */
    165168psDoubleArray *psDoubleArrayRealloc(psDoubleArray *myArray, ///< Array to reallocate
    166                                     int s       ///< Total number of elements to make available
    167     );
    168 /** Destructor \ingroup DataGroup */
    169 void psDoubleArrayFree(psDoubleArray *restrict myArray ///< Array to free
    170     );
     169                                    int nalloc) ///< Total number of elements to make available
     170;
     171
     172/** Destructor \ingroup DataGroup */
     173void psDoubleArrayFree(psDoubleArray *restrict myArray) ///< Array to free
     174;
    171175
    172176/************************************************************************************************************/
     
    175179typedef struct {
    176180    psType type;                        ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
    177     int size;                           ///< Total number of elements available
     181    int nalloc;                         ///< Total number of elements available
    178182    int n;                              ///< Number of elements in use
    179183    psFloatArray *arr;                  ///< The array data
     
    181185
    182186/** Constructor \ingroup DataGroup */
    183 psVectorArray *psVectorArrayAlloc(int s, ///< Total number of elements to make available
    184                                   int n ///< Number of elements that will be used
    185     );
    186 /** Reallocator \ingroup DataGroup */
    187 psVectorArray *psVectorArrayRealloc(psVectorArray *myArray, ///< Array to reallocate
    188                                     int s       ///< Total number of elements to make available
    189     );
    190 /** Destructor \ingroup DataGroup */
    191 void psVectorArrayFree(psVectorArray *restrict myArray ///< Array to free
    192     );
     187psVectorArray *psVectorArrayAlloc(int nalloc) ///< Total number of elements to make available
     188;
     189
     190/** Reallocator \ingroup DataGroup */
     191psVectorArray *psVectorArrayRealloc(psVectorArray *myArray ///< Array to reallocate
     192                                    int nalloc) ///< Total number of elements to make available
     193;
     194
     195/** Destructor \ingroup DataGroup */
     196void psVectorArrayFree(psVectorArray *restrict myArray) ///< Array to free
     197;
    193198
    194199/************************************************************************************************************/
     
    201206typedef struct {
    202207    int n;                              ///< Number of elements in use
    203     int size;                           ///< Number of total elements
     208    int nalloc;                         ///< Number of total elements
    204209    void **arr;                         ///< The elements
    205210} psVoidPtrArray;
    206211
    207212/** Constructor \ingroup DataGroup */
    208 psVoidPtrArray *psVoidPtrArrayAlloc(int n, ///< Number of elements to use
    209                                     int s ///< Total number of elements
    210                                     );
     213psVoidPtrArray *psVoidPtrArrayAlloc(int nalloc) ///< Number of elements to use
     214;
     215
    211216/** Reallocate \ingroup DataGroup */
    212217psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, ///< Array to reallocate
    213                                       int n ///< Number of elements
    214                                       );
     218                                      int nalloc) ///< Number of elements
     219;
     220
    215221/** Destructor \ingroup DataGroup */
    216222void psVoidPtrArrayFree(psVoidPtrArray *arr, ///< array to destroy
    217                         void (*elemFree)(void *) ///< destructor for array data
    218                         );
    219 
     223                        void (*elemFree)(void *)) ///< destructor for array data
     224;
    220225
    221226#endif
Note: See TracChangeset for help on using the changeset viewer.