Changeset 2302 for trunk/psLib/src/dataIO/psLookupTable.h
- Timestamp:
- Nov 8, 2004, 2:38:14 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/dataIO/psLookupTable.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataIO/psLookupTable.h
r2195 r2302 7 7 * @author Ross Harman, MHPCC 8 8 * 9 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-1 0-26 00:37:15$9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-11-09 00:38:14 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 15 15 #ifndef PS_LOOKUPTABLE_H 16 16 #define PS_LOOKUPTABLE_H 17 18 #include "psType.h" 19 #include "psVector.h" 20 #include "psArray.h" 17 21 18 22 … … 24 28 typedef struct 25 29 { 30 const char *fileName; ///< Name of file with table 31 psU64 numRows; ///< Number of table rows 32 psU64 numCols; ///< Number of table columns 33 psF64 validFrom; ///< Lower bound for rable read 34 psF64 validTo; ///< Upper bound for table read 26 35 psVector *index; ///< Vector of independent index values 27 psArray *values; ///< Array of dependent table values corresponding to index values .36 psArray *values; ///< Array of dependent table values corresponding to index values 28 37 } 29 38 psLookupTable; 30 39 31 40 32 /** Lookup error conditions41 /** Lookup table lookup status and error conditions 33 42 * 34 * Success and failureconditions for table lookups.43 * Success, failure, and status conditions for table lookups. 35 44 */ 36 45 typedef enum { 37 PS_LOOKUP_SUCCESS = 0x000, ///< Table lookup succeeded. 38 PS_LOOKUP_TOP = 0x0001, ///< Lookup off top of table. 39 PS_LOOKUP_BOTTOM = 0x0002, ///< Lookup off bottom of table. 40 PS_LOOKUP_ERROR = 0x0003, ///< Any other type of lookup error. 41 } psLookupErrorType; 46 PS_LOOKUP_SUCCESS = 0x0000, ///< Table lookup succeeded 47 PS_LOOKUP_PAST_TOP = 0x0101, ///< Lookup off top of table 48 PS_LOOKUP_PAST_BOTTOM = 0x0102, ///< Lookup off bottom of table 49 PS_LOOKUP_ERROR = 0x0104 ///< Any other type of lookup error 50 } psLookupStatusType; 51 52 /** Lookup table parse status and error conditions 53 * 54 * Success, failure, and status conditions for table parsing. 55 */ 56 typedef enum { 57 PS_PARSE_SUCCESS = 0x0000, ///< Table lookup succeeded 58 PS_PARSE_ERROR_TYPE = 0x0101, ///< Error parsing type 59 PS_PARSE_ERROR_VALUE = 0x0102, ///< Error parsing numerical value 60 PS_PARSE_ERROR_GENERAL = 0x0104 ///< Any other type of lookup error 61 }psParseErrorType; 42 62 43 63 /** Allocator for psLookupTable struct … … 48 68 */ 49 69 psLookupTable* psLookupTableAlloc( 50 psU64 numRows, ///< Number of rows 51 psU64 numCols ///< number of columns 70 const char *fileName, ///< Name of file to read 71 psF64 validFrom, ///< Lower bound for rable read 72 psF64 validTo ///< Upper bound for table read 52 73 ); 53 74 … … 59 80 */ 60 81 psLookupTable* psLookupTableRead( 61 char *fileName ///< Name of file to read82 psLookupTable *table ///< Table to read 62 83 ); 63 84 … … 67 88 * conditions. 68 89 * 69 * @return psLookupTable* New psLookupTable struct .90 * @return psLookupTable* New psLookupTable struct 70 91 */ 71 92 psF64 psLookupTableInterpolate( 72 93 psLookupTable *table, ///< Table with data 73 94 psF64 index, ///< Value to be interpolated 74 psMaskType *status ///< Status of lookup. 95 psU64 column, ///< Column in table to be interpolated 96 psLookupStatusType *status ///< Status of lookup 75 97 ); 76 98 … … 80 102 * conditions. 81 103 * 82 * @return psLookupTable* New psLookupTable struct .104 * @return psLookupTable* New psLookupTable struct 83 105 */ 84 psVector* psLookupTableInterpolate (106 psVector* psLookupTableInterpolateAll( 85 107 psLookupTable *table, ///< Table with data 86 108 psF64 index, ///< Value to be interpolated 87 ps MaskType *status ///< Status of lookup.109 psVector *stats ///< Vector of status for each lookup 88 110 ); 89 111
Note:
See TracChangeset
for help on using the changeset viewer.
