Changeset 4315
- Timestamp:
- Jun 17, 2005, 4:30:50 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 34 edited
-
collections/psHash.c (modified) (7 diffs)
-
collections/psHash.h (modified) (3 diffs)
-
dataIO/psFits.c (modified) (7 diffs)
-
dataIO/psFits.h (modified) (5 diffs)
-
dataManip/psFunctions.c (modified) (2 diffs)
-
dataManip/psFunctions.h (modified) (2 diffs)
-
dataManip/psStats.c (modified) (2 diffs)
-
dataManip/psStats.h (modified) (2 diffs)
-
fits/psFits.c (modified) (7 diffs)
-
fits/psFits.h (modified) (5 diffs)
-
image/psImage.c (modified) (2 diffs)
-
image/psImage.h (modified) (2 diffs)
-
image/psImageConvolve.c (modified) (2 diffs)
-
image/psImageConvolve.h (modified) (2 diffs)
-
image/psImagePixelManip.c (modified) (4 diffs)
-
image/psImagePixelManip.h (modified) (4 diffs)
-
imageops/psImageConvolve.c (modified) (2 diffs)
-
imageops/psImageConvolve.h (modified) (2 diffs)
-
imageops/psImagePixelManip.c (modified) (4 diffs)
-
imageops/psImagePixelManip.h (modified) (4 diffs)
-
math/psPolynomial.c (modified) (2 diffs)
-
math/psPolynomial.h (modified) (2 diffs)
-
math/psSpline.c (modified) (2 diffs)
-
math/psSpline.h (modified) (2 diffs)
-
math/psStats.c (modified) (2 diffs)
-
math/psStats.h (modified) (2 diffs)
-
mathtypes/psImage.c (modified) (2 diffs)
-
mathtypes/psImage.h (modified) (2 diffs)
-
sys/psError.c (modified) (3 diffs)
-
sys/psError.h (modified) (3 diffs)
-
sysUtils/psError.c (modified) (3 diffs)
-
sysUtils/psError.h (modified) (3 diffs)
-
types/psHash.c (modified) (7 diffs)
-
types/psHash.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psHash.c
r4136 r4315 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 07 22:37:52$14 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:49 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 43 43 The linked list 44 44 *****************************************************************************/ 45 psList* psHashKeyList( psHash* table)45 psList* psHashKeyList(const psHash* hash) 46 46 { 47 47 psS32 i = 0; // Loop index variable … … 49 49 psHashBucket* ptr = NULL; // Used to step thru linked list. 50 50 51 if ( table== NULL) {51 if (hash == NULL) { 52 52 return NULL; 53 53 } … … 57 57 // Loop through every bucket in the hash table. If that bucket is not 58 58 // NULL, then add the bucket's key to the linked list. 59 for (i = 0; i < table->nbucket; i++) {60 if ( table->buckets[i] != NULL) {59 for (i = 0; i < hash->nbucket; i++) { 60 if (hash->buckets[i] != NULL) { 61 61 // Since a bucket contains a linked list of keys/data, we must 62 62 // step trough each key in that linked list: 63 63 64 ptr = table->buckets[i];64 ptr = hash->buckets[i]; 65 65 while (ptr != NULL) { 66 66 psListAdd(myLinkList, PS_LIST_HEAD, ptr->key); … … 135 135 The new hash table. 136 136 *****************************************************************************/ 137 psHash* psHashAlloc( psS32 nbucket) // initial number of buckets137 psHash* psHashAlloc(long nalloc) // initial number of buckets 138 138 { 139 139 psS32 i = 0; // loop index variable … … 145 145 146 146 // Allocate memory for the buckets. 147 table->buckets = psAlloc(n bucket* sizeof(psHashBucket* ));148 table->nbucket = n bucket;149 150 psTrace("utils.hash", 1, "Creating %d-element hash table\n", n bucket);147 table->buckets = psAlloc(nalloc * sizeof(psHashBucket* )); 148 table->nbucket = nalloc; 149 150 psTrace("utils.hash", 1, "Creating %d-element hash table\n", nalloc); 151 151 152 152 // Initialize all buckets to NULL. 153 for (i = 0; i < n bucket; i++)153 for (i = 0; i < nalloc; i++) 154 154 { 155 155 table->buckets[i] = NULL; … … 383 383 boolean value defining success or failure 384 384 *****************************************************************************/ 385 psBool psHashRemove(psHash* table,386 const char *key)385 bool psHashRemove(psHash* table, 386 const char *key) 387 387 { 388 388 psPtr data = NULL; -
trunk/psLib/src/collections/psHash.h
r4162 r4315 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 08 23:40:45$13 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-18 02:30:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 /// Allocate hash buckets in table. 48 48 psHash* psHashAlloc( 49 psS32 nbucket///< The number of buckets to allocate.49 long nalloc ///< The number of buckets to allocate. 50 50 ); 51 51 52 52 /// Insert entry into table. 53 53 psBool psHashAdd( 54 psHash* table, ///< The table to insert in.55 const char *key, ///< The key to use.56 psPtr data ///< The data to insert.54 psHash* table, ///< The table to insert in. 55 const char *key, ///< The key to use. 56 psPtr data ///< The data to insert. 57 57 ); 58 58 59 59 /// Lookup key in table. 60 60 psPtr psHashLookup( 61 psHash* table, ///< The table to lookup key in.62 const char *key ///< The key to lookup.61 psHash* table, ///< The table to lookup key in. 62 const char *key ///< The key to lookup. 63 63 ); 64 64 65 65 /// Remove key from table. 66 psBool psHashRemove(67 psHash* table, ///< The table to lookup key in.68 const char *key ///< The key to lookup.66 bool psHashRemove( 67 psHash* table, ///< The table to lookup key in. 68 const char *key ///< The key to lookup. 69 69 ); 70 70 71 71 /// List all keys in table. 72 72 psList* psHashKeyList( 73 psHash* table///< The table to list keys from..73 const psHash* hash ///< The table to list keys from.. 74 74 ); 75 75 … … 79 79 */ 80 80 psArray* psHashToArray( 81 psHash* table ///< The table to convert to psArray.81 psHash* table ///< The table to convert to psArray. 82 82 ); 83 83 -
trunk/psLib/src/dataIO/psFits.c
r4308 r4315 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 7 23:44:21$9 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 357 357 } 358 358 359 bool psFitsSetExtName( constpsFits* fits, const char* name)359 bool psFitsSetExtName(psFits* fits, const char* name) 360 360 { 361 361 if (fits == NULL) { … … 881 881 } 882 882 883 bool psFitsUpdateImage( constpsFits* fits,883 bool psFitsUpdateImage(psFits* fits, 884 884 const psImage* input, 885 885 psRegion region, … … 1019 1019 } 1020 1020 1021 bool psFitsWriteHeader(const psMetadata* header,1021 bool psFitsWriteHeader(const psMetadata* output, 1022 1022 const psFits* fits) 1023 1023 { … … 1029 1029 } 1030 1030 1031 if ( header== NULL) {1031 if (output == NULL) { 1032 1032 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1033 1033 PS_ERRORTEXT_psFits_METADATA_NULL); … … 1039 1039 //transverse the metadata list and add each key. 1040 1040 1041 psListIterator* iter = psListIteratorAlloc( header->list,PS_LIST_HEAD,true);1041 psListIterator* iter = psListIteratorAlloc(output->list,PS_LIST_HEAD,true); 1042 1042 psMetadataItem* item; 1043 1043 while ( (item=psListGetAndIncrement(iter)) != NULL ) { … … 1397 1397 1398 1398 1399 psArray* psFitsReadTable( constpsFits* fits)1399 psArray* psFitsReadTable(psFits* fits) 1400 1400 { 1401 1401 int status = 0; -
trunk/psLib/src/dataIO/psFits.h
r4308 r4315 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 7 23:44:21$9 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 104 104 */ 105 105 bool psFitsSetExtName( 106 const psFits* fits,///< the psFits object106 psFits* fits, ///< the psFits object 107 107 const char* name ///< the extension name 108 108 ); … … 155 155 */ 156 156 bool psFitsWriteHeader( 157 const psMetadata* header, ///< the psMetadata data in which to write157 const psMetadata* output, ///< the psMetadata data in which to write 158 158 const psFits* fits ///< the psFits object 159 159 ); … … 186 186 */ 187 187 bool psFitsUpdateImage( 188 const psFits* fits,///< the psFits object188 psFits* fits, ///< the psFits object 189 189 const psImage* input, ///< the image to output 190 190 psRegion region, ///< the region in the FITS image to write … … 234 234 */ 235 235 psArray* psFitsReadTable( 236 const psFits* fits///< the psFits object236 psFits* fits ///< the psFits object 237 237 ); 238 238 -
trunk/psLib/src/dataManip/psFunctions.c
r4288 r4315 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.10 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 6 22:32:07$9 * @version $Revision: 1.109 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1016 1016 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] 1017 1017 *****************************************************************************/ 1018 psF32 psGaussian(psF32 x, psF32 mean, psF32 sigma, psBool normal)1018 float psGaussian(float x, float mean, float sigma, bool normal) 1019 1019 { 1020 1020 psF32 tmp = 1.0; -
trunk/psLib/src/dataManip/psFunctions.h
r4190 r4315 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 09 19:26:48$14 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:49 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 41 41 * @return psF32 value on the gaussian curve given the input parameters 42 42 */ 43 psF32psGaussian(44 psF32x, ///< Value at which to evaluate45 psF32mean, ///< Mean for the Gaussian46 psF32 stddev,///< Standard deviation for the Gaussian47 psBool normal///< Indicates whether result should be normalized43 float psGaussian( 44 float x, ///< Value at which to evaluate 45 float mean, ///< Mean for the Gaussian 46 float sigma, ///< Standard deviation for the Gaussian 47 bool normal ///< Indicates whether result should be normalized 48 48 ); 49 49 -
trunk/psLib/src/dataManip/psStats.c
r4225 r4315 14 14 * stats->binsize 15 15 * 16 * @version $Revision: 1.13 3$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-06-1 3 20:18:18$16 * @version $Revision: 1.134 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-06-18 02:30:49 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1798 1798 The histogram structure 1799 1799 *****************************************************************************/ 1800 psHistogram* psHistogramAlloc( psF32 lower, psF32 upper, psS32n)1800 psHistogram* psHistogramAlloc(float lower, float upper, int n) 1801 1801 { 1802 1802 PS_ASSERT_INT_POSITIVE(n, NULL); -
trunk/psLib/src/dataManip/psStats.h
r4293 r4315 14 14 * @author GLG, MHPCC 15 15 * 16 * @version $Revision: 1.4 3$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-06-1 7 00:11:05$16 * @version $Revision: 1.44 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-06-18 02:30:49 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 136 136 */ 137 137 psHistogram* psHistogramAlloc( 138 psF32lower, ///< Lower limit for the bins139 psF32upper, ///< Upper limit for the bins140 psS32 n///< Number of bins138 float lower, ///< Lower limit for the bins 139 float upper, ///< Upper limit for the bins 140 int n ///< Number of bins 141 141 ); 142 142 -
trunk/psLib/src/fits/psFits.c
r4308 r4315 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 7 23:44:21$9 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 357 357 } 358 358 359 bool psFitsSetExtName( constpsFits* fits, const char* name)359 bool psFitsSetExtName(psFits* fits, const char* name) 360 360 { 361 361 if (fits == NULL) { … … 881 881 } 882 882 883 bool psFitsUpdateImage( constpsFits* fits,883 bool psFitsUpdateImage(psFits* fits, 884 884 const psImage* input, 885 885 psRegion region, … … 1019 1019 } 1020 1020 1021 bool psFitsWriteHeader(const psMetadata* header,1021 bool psFitsWriteHeader(const psMetadata* output, 1022 1022 const psFits* fits) 1023 1023 { … … 1029 1029 } 1030 1030 1031 if ( header== NULL) {1031 if (output == NULL) { 1032 1032 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1033 1033 PS_ERRORTEXT_psFits_METADATA_NULL); … … 1039 1039 //transverse the metadata list and add each key. 1040 1040 1041 psListIterator* iter = psListIteratorAlloc( header->list,PS_LIST_HEAD,true);1041 psListIterator* iter = psListIteratorAlloc(output->list,PS_LIST_HEAD,true); 1042 1042 psMetadataItem* item; 1043 1043 while ( (item=psListGetAndIncrement(iter)) != NULL ) { … … 1397 1397 1398 1398 1399 psArray* psFitsReadTable( constpsFits* fits)1399 psArray* psFitsReadTable(psFits* fits) 1400 1400 { 1401 1401 int status = 0; -
trunk/psLib/src/fits/psFits.h
r4308 r4315 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 7 23:44:21$9 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 104 104 */ 105 105 bool psFitsSetExtName( 106 const psFits* fits,///< the psFits object106 psFits* fits, ///< the psFits object 107 107 const char* name ///< the extension name 108 108 ); … … 155 155 */ 156 156 bool psFitsWriteHeader( 157 const psMetadata* header, ///< the psMetadata data in which to write157 const psMetadata* output, ///< the psMetadata data in which to write 158 158 const psFits* fits ///< the psFits object 159 159 ); … … 186 186 */ 187 187 bool psFitsUpdateImage( 188 const psFits* fits,///< the psFits object188 psFits* fits, ///< the psFits object 189 189 const psImage* input, ///< the image to output 190 190 psRegion region, ///< the region in the FITS image to write … … 234 234 */ 235 235 psArray* psFitsReadTable( 236 const psFits* fits///< the psFits object236 psFits* fits ///< the psFits object 237 237 ); 238 238 -
trunk/psLib/src/image/psImage.c
r4128 r4315 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.6 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 07 02:29:44$11 * @version $Revision: 1.68 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-18 02:30:49 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 psImage* psImageAlloc(psU32 numCols, 51 51 psU32 numRows, 52 constpsElemType type)52 psElemType type) 53 53 { 54 54 psS32 area = 0; -
trunk/psLib/src/image/psImage.h
r4195 r4315 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.5 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 09 21:20:20$13 * @version $Revision: 1.56 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-18 02:30:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 105 105 psU32 numCols, ///< Number of rows in image. 106 106 psU32 numRows, ///< Number of columns in image. 107 const psElemType type///< Type of data for image.107 psElemType type ///< Type of data for image. 108 108 ); 109 109 -
trunk/psLib/src/image/psImageConvolve.c
r4128 r4315 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-06- 07 02:29:44$7 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-06-18 02:30:49 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 279 279 } 280 280 281 psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, psBool direct)281 psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, bool direct) 282 282 { 283 283 if (in == NULL) { -
trunk/psLib/src/image/psImageConvolve.h
r4243 r4315 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 4 02:54:15$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 123 123 const psImage* in, ///< the psImage to convolve 124 124 const psKernel* kernel, ///< kernel to colvolve with 125 psBool direct ///< specifies method, true=direct convolution, false=fourier125 bool direct ///< specifies method, true=direct convolution, false=fourier 126 126 ); 127 127 -
trunk/psLib/src/image/psImagePixelManip.c
r3968 r4315 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 5-19 02:08:21$12 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-18 02:30:49 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 #include "psCoord.h" 32 32 33 psS32psImageClip(psImage* input,34 psF64min,35 psF64vmin,36 psF64max,37 psF64vmax)33 int psImageClip(psImage* input, 34 double min, 35 double vmin, 36 double max, 37 double vmax) 38 38 { 39 39 psS32 numClipped = 0; … … 140 140 } 141 141 142 psS32psImageClipNaN(psImage* input,143 psF64value)142 int psImageClipNaN(psImage* input, 143 float value) 144 144 { 145 145 psS32 numClipped = 0; … … 310 310 } 311 311 312 psS32psImageClipComplexRegion(psImage* input,313 psC64 min,314 psC64 vmin,315 psC64 max,316 psC64 vmax)312 int psImageClipComplexRegion(psImage* input, 313 psC64 min, 314 psC64 vmin, 315 psC64 max, 316 psC64 vmax) 317 317 { 318 318 psS32 numClipped = 0; -
trunk/psLib/src/image/psImagePixelManip.h
r4162 r4315 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 08 23:40:45$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-18 02:30:49 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 * @return psS32 The number of clipped pixels 33 33 */ 34 psS32psImageClip(34 int psImageClip( 35 35 psImage* input, ///< the image to clip 36 psF64 min,///< the minimum image value allowed37 psF64 vmin,///< the value pixels < min are set to38 psF64 max,///< the maximum image value allowed39 psF64 vmax///< the value pixels > max are set to36 double min, ///< the minimum image value allowed 37 double vmin, ///< the value pixels < min are set to 38 double max, ///< the maximum image value allowed 39 double vmax ///< the value pixels > max are set to 40 40 ); 41 41 … … 49 49 * @return psS32 The number of clipped pixels 50 50 */ 51 psS32psImageClipComplexRegion(51 int psImageClipComplexRegion( 52 52 psImage* input, ///< the image to clip 53 53 psC64 min, ///< the minimum image value allowed … … 64 64 * @return psS32 The number of clipped pixels 65 65 */ 66 psS32psImageClipNaN(66 int psImageClipNaN( 67 67 psImage* input, ///< the image to clip 68 psF64value ///< the value to set all NaN/Inf values to68 float value ///< the value to set all NaN/Inf values to 69 69 ); 70 70 -
trunk/psLib/src/imageops/psImageConvolve.c
r4128 r4315 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-06- 07 02:29:44$7 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-06-18 02:30:49 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 279 279 } 280 280 281 psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, psBool direct)281 psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, bool direct) 282 282 { 283 283 if (in == NULL) { -
trunk/psLib/src/imageops/psImageConvolve.h
r4243 r4315 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 4 02:54:15$9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 123 123 const psImage* in, ///< the psImage to convolve 124 124 const psKernel* kernel, ///< kernel to colvolve with 125 psBool direct ///< specifies method, true=direct convolution, false=fourier125 bool direct ///< specifies method, true=direct convolution, false=fourier 126 126 ); 127 127 -
trunk/psLib/src/imageops/psImagePixelManip.c
r3968 r4315 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 5-19 02:08:21$12 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-18 02:30:49 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 #include "psCoord.h" 32 32 33 psS32psImageClip(psImage* input,34 psF64min,35 psF64vmin,36 psF64max,37 psF64vmax)33 int psImageClip(psImage* input, 34 double min, 35 double vmin, 36 double max, 37 double vmax) 38 38 { 39 39 psS32 numClipped = 0; … … 140 140 } 141 141 142 psS32psImageClipNaN(psImage* input,143 psF64value)142 int psImageClipNaN(psImage* input, 143 float value) 144 144 { 145 145 psS32 numClipped = 0; … … 310 310 } 311 311 312 psS32psImageClipComplexRegion(psImage* input,313 psC64 min,314 psC64 vmin,315 psC64 max,316 psC64 vmax)312 int psImageClipComplexRegion(psImage* input, 313 psC64 min, 314 psC64 vmin, 315 psC64 max, 316 psC64 vmax) 317 317 { 318 318 psS32 numClipped = 0; -
trunk/psLib/src/imageops/psImagePixelManip.h
r4162 r4315 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-06- 08 23:40:45$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-06-18 02:30:49 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 * @return psS32 The number of clipped pixels 33 33 */ 34 psS32psImageClip(34 int psImageClip( 35 35 psImage* input, ///< the image to clip 36 psF64 min,///< the minimum image value allowed37 psF64 vmin,///< the value pixels < min are set to38 psF64 max,///< the maximum image value allowed39 psF64 vmax///< the value pixels > max are set to36 double min, ///< the minimum image value allowed 37 double vmin, ///< the value pixels < min are set to 38 double max, ///< the maximum image value allowed 39 double vmax ///< the value pixels > max are set to 40 40 ); 41 41 … … 49 49 * @return psS32 The number of clipped pixels 50 50 */ 51 psS32psImageClipComplexRegion(51 int psImageClipComplexRegion( 52 52 psImage* input, ///< the image to clip 53 53 psC64 min, ///< the minimum image value allowed … … 64 64 * @return psS32 The number of clipped pixels 65 65 */ 66 psS32psImageClipNaN(66 int psImageClipNaN( 67 67 psImage* input, ///< the image to clip 68 psF64value ///< the value to set all NaN/Inf values to68 float value ///< the value to set all NaN/Inf values to 69 69 ); 70 70 -
trunk/psLib/src/math/psPolynomial.c
r4288 r4315 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.10 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 6 22:32:07$9 * @version $Revision: 1.109 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1016 1016 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] 1017 1017 *****************************************************************************/ 1018 psF32 psGaussian(psF32 x, psF32 mean, psF32 sigma, psBool normal)1018 float psGaussian(float x, float mean, float sigma, bool normal) 1019 1019 { 1020 1020 psF32 tmp = 1.0; -
trunk/psLib/src/math/psPolynomial.h
r4190 r4315 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 09 19:26:48$14 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:49 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 41 41 * @return psF32 value on the gaussian curve given the input parameters 42 42 */ 43 psF32psGaussian(44 psF32x, ///< Value at which to evaluate45 psF32mean, ///< Mean for the Gaussian46 psF32 stddev,///< Standard deviation for the Gaussian47 psBool normal///< Indicates whether result should be normalized43 float psGaussian( 44 float x, ///< Value at which to evaluate 45 float mean, ///< Mean for the Gaussian 46 float sigma, ///< Standard deviation for the Gaussian 47 bool normal ///< Indicates whether result should be normalized 48 48 ); 49 49 -
trunk/psLib/src/math/psSpline.c
r4288 r4315 7 7 * polynomials. It also contains a Gaussian functions. 8 8 * 9 * @version $Revision: 1.10 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-06-1 6 22:32:07$9 * @version $Revision: 1.109 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-06-18 02:30:49 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1016 1016 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] 1017 1017 *****************************************************************************/ 1018 psF32 psGaussian(psF32 x, psF32 mean, psF32 sigma, psBool normal)1018 float psGaussian(float x, float mean, float sigma, bool normal) 1019 1019 { 1020 1020 psF32 tmp = 1.0; -
trunk/psLib/src/math/psSpline.h
r4190 r4315 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 09 19:26:48$14 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:49 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 41 41 * @return psF32 value on the gaussian curve given the input parameters 42 42 */ 43 psF32psGaussian(44 psF32x, ///< Value at which to evaluate45 psF32mean, ///< Mean for the Gaussian46 psF32 stddev,///< Standard deviation for the Gaussian47 psBool normal///< Indicates whether result should be normalized43 float psGaussian( 44 float x, ///< Value at which to evaluate 45 float mean, ///< Mean for the Gaussian 46 float sigma, ///< Standard deviation for the Gaussian 47 bool normal ///< Indicates whether result should be normalized 48 48 ); 49 49 -
trunk/psLib/src/math/psStats.c
r4225 r4315 14 14 * stats->binsize 15 15 * 16 * @version $Revision: 1.13 3$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-06-1 3 20:18:18$16 * @version $Revision: 1.134 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-06-18 02:30:49 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1798 1798 The histogram structure 1799 1799 *****************************************************************************/ 1800 psHistogram* psHistogramAlloc( psF32 lower, psF32 upper, psS32n)1800 psHistogram* psHistogramAlloc(float lower, float upper, int n) 1801 1801 { 1802 1802 PS_ASSERT_INT_POSITIVE(n, NULL); -
trunk/psLib/src/math/psStats.h
r4293 r4315 14 14 * @author GLG, MHPCC 15 15 * 16 * @version $Revision: 1.4 3$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-06-1 7 00:11:05$16 * @version $Revision: 1.44 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-06-18 02:30:49 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 136 136 */ 137 137 psHistogram* psHistogramAlloc( 138 psF32lower, ///< Lower limit for the bins139 psF32upper, ///< Upper limit for the bins140 psS32 n///< Number of bins138 float lower, ///< Lower limit for the bins 139 float upper, ///< Upper limit for the bins 140 int n ///< Number of bins 141 141 ); 142 142 -
trunk/psLib/src/mathtypes/psImage.c
r4128 r4315 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.6 7$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-06- 07 02:29:44$11 * @version $Revision: 1.68 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-18 02:30:49 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 50 50 psImage* psImageAlloc(psU32 numCols, 51 51 psU32 numRows, 52 constpsElemType type)52 psElemType type) 53 53 { 54 54 psS32 area = 0; -
trunk/psLib/src/mathtypes/psImage.h
r4195 r4315 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.5 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 09 21:20:20$13 * @version $Revision: 1.56 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-18 02:30:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 105 105 psU32 numCols, ///< Number of rows in image. 106 106 psU32 numRows, ///< Number of columns in image. 107 const psElemType type///< Type of data for image.107 psElemType type ///< Type of data for image. 108 108 ); 109 109 -
trunk/psLib/src/sys/psError.c
r3682 r4315 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 4-07 20:27:41$12 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-18 02:30:50 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 177 177 178 178 } 179 void psErrorStackPrint(FILE *fd, const char *f mt, ...)179 void psErrorStackPrint(FILE *fd, const char *format, ...) 180 180 { 181 181 va_list argPtr; // variable list arguement pointer 182 182 183 183 // Get the variable list parameters to pass to logging function 184 va_start(argPtr, f mt);185 186 psErrorStackPrintV(fd,f mt,argPtr);184 va_start(argPtr, format); 185 186 psErrorStackPrintV(fd,format,argPtr); 187 187 188 188 va_end(argPtr); 189 189 } 190 190 191 void psErrorStackPrintV(FILE *fd, const char *f mt, va_list va)191 void psErrorStackPrintV(FILE *fd, const char *format, va_list va) 192 192 { 193 193 … … 195 195 196 196 if (errorStackSize > 0) { 197 vfprintf(fd,f mt,va);197 vfprintf(fd,format,va); 198 198 199 199 for (psS32 lcv=0;lcv<errorStackSize;lcv++) { -
trunk/psLib/src/sys/psError.h
r4190 r4315 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 09 19:26:48$14 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:50 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 86 86 void psErrorStackPrint( 87 87 FILE* fd, ///< destination file descriptor 88 const char* f mt, ///< printf-style format of header line88 const char* format, ///< printf-style format of header line 89 89 ... ///< any parameters required in fmt 90 90 ); … … 101 101 void psErrorStackPrintV( 102 102 FILE* fd, ///< destination file descriptor 103 const char* f mt, ///< printf-style format of header line103 const char* format, ///< printf-style format of header line 104 104 va_list va ///< any parameters required in fmt 105 105 ); -
trunk/psLib/src/sysUtils/psError.c
r3682 r4315 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 4-07 20:27:41$12 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-18 02:30:50 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 177 177 178 178 } 179 void psErrorStackPrint(FILE *fd, const char *f mt, ...)179 void psErrorStackPrint(FILE *fd, const char *format, ...) 180 180 { 181 181 va_list argPtr; // variable list arguement pointer 182 182 183 183 // Get the variable list parameters to pass to logging function 184 va_start(argPtr, f mt);185 186 psErrorStackPrintV(fd,f mt,argPtr);184 va_start(argPtr, format); 185 186 psErrorStackPrintV(fd,format,argPtr); 187 187 188 188 va_end(argPtr); 189 189 } 190 190 191 void psErrorStackPrintV(FILE *fd, const char *f mt, va_list va)191 void psErrorStackPrintV(FILE *fd, const char *format, va_list va) 192 192 { 193 193 … … 195 195 196 196 if (errorStackSize > 0) { 197 vfprintf(fd,f mt,va);197 vfprintf(fd,format,va); 198 198 199 199 for (psS32 lcv=0;lcv<errorStackSize;lcv++) { -
trunk/psLib/src/sysUtils/psError.h
r4190 r4315 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 09 19:26:48$14 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:50 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 86 86 void psErrorStackPrint( 87 87 FILE* fd, ///< destination file descriptor 88 const char* f mt, ///< printf-style format of header line88 const char* format, ///< printf-style format of header line 89 89 ... ///< any parameters required in fmt 90 90 ); … … 101 101 void psErrorStackPrintV( 102 102 FILE* fd, ///< destination file descriptor 103 const char* f mt, ///< printf-style format of header line103 const char* format, ///< printf-style format of header line 104 104 va_list va ///< any parameters required in fmt 105 105 ); -
trunk/psLib/src/types/psHash.c
r4136 r4315 12 12 * @author GLG, MHPCC 13 13 * 14 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-06- 07 22:37:52$14 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-18 02:30:49 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 43 43 The linked list 44 44 *****************************************************************************/ 45 psList* psHashKeyList( psHash* table)45 psList* psHashKeyList(const psHash* hash) 46 46 { 47 47 psS32 i = 0; // Loop index variable … … 49 49 psHashBucket* ptr = NULL; // Used to step thru linked list. 50 50 51 if ( table== NULL) {51 if (hash == NULL) { 52 52 return NULL; 53 53 } … … 57 57 // Loop through every bucket in the hash table. If that bucket is not 58 58 // NULL, then add the bucket's key to the linked list. 59 for (i = 0; i < table->nbucket; i++) {60 if ( table->buckets[i] != NULL) {59 for (i = 0; i < hash->nbucket; i++) { 60 if (hash->buckets[i] != NULL) { 61 61 // Since a bucket contains a linked list of keys/data, we must 62 62 // step trough each key in that linked list: 63 63 64 ptr = table->buckets[i];64 ptr = hash->buckets[i]; 65 65 while (ptr != NULL) { 66 66 psListAdd(myLinkList, PS_LIST_HEAD, ptr->key); … … 135 135 The new hash table. 136 136 *****************************************************************************/ 137 psHash* psHashAlloc( psS32 nbucket) // initial number of buckets137 psHash* psHashAlloc(long nalloc) // initial number of buckets 138 138 { 139 139 psS32 i = 0; // loop index variable … … 145 145 146 146 // Allocate memory for the buckets. 147 table->buckets = psAlloc(n bucket* sizeof(psHashBucket* ));148 table->nbucket = n bucket;149 150 psTrace("utils.hash", 1, "Creating %d-element hash table\n", n bucket);147 table->buckets = psAlloc(nalloc * sizeof(psHashBucket* )); 148 table->nbucket = nalloc; 149 150 psTrace("utils.hash", 1, "Creating %d-element hash table\n", nalloc); 151 151 152 152 // Initialize all buckets to NULL. 153 for (i = 0; i < n bucket; i++)153 for (i = 0; i < nalloc; i++) 154 154 { 155 155 table->buckets[i] = NULL; … … 383 383 boolean value defining success or failure 384 384 *****************************************************************************/ 385 psBool psHashRemove(psHash* table,386 const char *key)385 bool psHashRemove(psHash* table, 386 const char *key) 387 387 { 388 388 psPtr data = NULL; -
trunk/psLib/src/types/psHash.h
r4162 r4315 11 11 * @author GLG, MHPCC 12 12 * 13 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-06- 08 23:40:45$13 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-06-18 02:30:49 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 47 47 /// Allocate hash buckets in table. 48 48 psHash* psHashAlloc( 49 psS32 nbucket///< The number of buckets to allocate.49 long nalloc ///< The number of buckets to allocate. 50 50 ); 51 51 52 52 /// Insert entry into table. 53 53 psBool psHashAdd( 54 psHash* table, ///< The table to insert in.55 const char *key, ///< The key to use.56 psPtr data ///< The data to insert.54 psHash* table, ///< The table to insert in. 55 const char *key, ///< The key to use. 56 psPtr data ///< The data to insert. 57 57 ); 58 58 59 59 /// Lookup key in table. 60 60 psPtr psHashLookup( 61 psHash* table, ///< The table to lookup key in.62 const char *key ///< The key to lookup.61 psHash* table, ///< The table to lookup key in. 62 const char *key ///< The key to lookup. 63 63 ); 64 64 65 65 /// Remove key from table. 66 psBool psHashRemove(67 psHash* table, ///< The table to lookup key in.68 const char *key ///< The key to lookup.66 bool psHashRemove( 67 psHash* table, ///< The table to lookup key in. 68 const char *key ///< The key to lookup. 69 69 ); 70 70 71 71 /// List all keys in table. 72 72 psList* psHashKeyList( 73 psHash* table///< The table to list keys from..73 const psHash* hash ///< The table to list keys from.. 74 74 ); 75 75 … … 79 79 */ 80 80 psArray* psHashToArray( 81 psHash* table ///< The table to convert to psArray.81 psHash* table ///< The table to convert to psArray. 82 82 ); 83 83
Note:
See TracChangeset
for help on using the changeset viewer.
