Changeset 486 for trunk/psLib/src/collections/psArray.h
- Timestamp:
- Apr 20, 2004, 2:40:32 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psArray.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psArray.h
r485 r486 8 8 * @author Ross Harman, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-04-21 00: 18:05$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-04-21 00:40:32 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 96 96 typedef struct 97 97 { 98 psType type; ///< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!99 int nalloc; ///< Total number of elements available.100 int n; ///< Number of elements in use.101 float *arr; ///< Array data.98 psType type; ///< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT! 99 int nalloc; ///< Total number of elements available. 100 int n; ///< Number of elements in use. 101 float *arr; ///< Array data. 102 102 } 103 103 psFloatArray; 104 105 /** An array of doubles. 106 * 107 * Struct for maintaining an array of double precision floating point numbers. 108 * 109 */ 110 typedef struct 111 { 112 psType type; ///< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT! 113 int nalloc; ///< Total number of elements available. 114 int n; ///< Number of elements in use. 115 double *arr; ///< Array data. 116 } 117 psDoubleArray; 104 118 105 119 /*****************************************************************************/ … … 107 121 /*****************************************************************************/ 108 122 109 /** Allocate an integer array */ 123 /** Allocate an integer array. 124 * 125 * Uses psLib memory allocation functions to create an array of integers as defined by the psIntArray struct. 126 * 127 */ 110 128 psIntArray *psIntArrayAlloc( 111 129 int nalloc ///< Total number of elements to make available 112 130 ); 113 131 114 /** Reallocate an integer array */ 132 /** Reallocate an integer array. 133 * 134 * Uses psLib memory allocation functions to reallocate an array of integers as defined by the psIntArray 135 * struct. 136 * 137 */ 115 138 psIntArray *psIntArrayRealloc( 116 139 psIntArray *myArray, ///< Array to reallocate. … … 119 142 120 143 121 /** Deallocate an integer array */ 144 /** Deallocate an integer array 145 * 146 * Uses psLib memory allocation functions to deallocate an array of integers as defined by the psIntArray 147 * struct. 148 * 149 */ 122 150 void psIntArrayFree( 123 151 psIntArray *restrict myArray ///< Array to free … … 153 181 psFloatArray *restrict myArray ///< Array to free 154 182 ); 183 184 /** Allocate a Double array. 185 * 186 * Uses psLib memory allocation functions to create an array of doubles as defined by the psDoubleArray 187 * struct. 188 * 189 */ 190 psDoubleArray *psDoubleArrayAlloc( 191 int nalloc ///< Total number of elements to make available. 192 ); 193 194 /** Reallocate a Double array. 195 * 196 * Uses psLib memory allocation functions to reallocate an array of Doubles as defined by the psDoubleArray 197 * struct. 198 * 199 */ 200 psDoubleArray *psDoubleArrayRealloc( 201 psDoubleArray *myArray, ///< Array to reallocate. 202 int nalloc ///< Total number of elements to make available. 203 ); 204 205 /** Deallocate a Double array 206 * 207 * Uses psLib memory allocation functions to deallocate an array of doubles as defined by the psDoubleArray 208 * struct. 209 * 210 */ 211 void psDoubleArrayFree( 212 psDoubleArray *restrict myArray ///< Array to free 213 ); 214 215 216 217 218 219 220 155 221 156 222 /** An array of complex numbers. … … 182 248 183 249 184 /************************************************************************************************************/ 185 186 /** An array of double-precision real numbers */ 187 typedef struct 188 { 189 psType type; ///< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT! 190 int nalloc; ///< Total number of elements available 191 int n; ///< Number of elements in use 192 double *arr; ///< The array data 193 } 194 psDoubleArray; 195 196 /** Constructor \ingroup DataGroup */ 197 psDoubleArray *psDoubleArrayAlloc(int nalloc) ///< Total number of elements to make available 198 ; 199 200 /** Reallocator \ingroup DataGroup */ 201 psDoubleArray *psDoubleArrayRealloc(psDoubleArray *myArray, ///< Array to reallocate 202 int nalloc) ///< Total number of elements to make available 203 ; 204 205 /** Destructor \ingroup DataGroup */ 206 void psDoubleArrayFree(psDoubleArray *restrict myArray) ///< Array to free 207 ; 250 208 251 209 252 /** Array of pointers to void.
Note:
See TracChangeset
for help on using the changeset viewer.
