IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 31, 2005, 11:46:56 AM (21 years ago)
Author:
evanalst
Message:

SDR-14 updates to functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataIO/psLookupTable.h

    r3684 r4050  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2005-04-08 17:58:57 $
     9*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2005-05-31 21:46:56 $
    1111*
    1212*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828typedef struct
    2929{
    30     const char *fileName;              ///< Name of file with table
    31     psU64 numRows;                     ///< Number of table rows
    32     psU64 numCols;                     ///< Number of table columns
     30    const char *filename;              ///< Name of file with table
     31    const char *format;                ///< scanf-like format string for file
     32    unsigned int indexCol;             ///< Column of the index vector (starting at zero)
     33    psVector *index;                   ///< Vector of independent index values
     34    psArray *values;                   ///< Array of dependent table values corresponding to index values
    3335    psF64 validFrom;                   ///< Lower bound for rable read
    3436    psF64 validTo;                     ///< Upper bound for table read
    35     psVector *index;                   ///< Vector of independent index values
    36     psArray *values;                   ///< Array of dependent table values corresponding to index values
    3737}
    3838psLookupTable;
     
    6969psLookupTable* psLookupTableAlloc(
    7070    const char *fileName,           ///< Name of file to read
    71     psF64 validFrom,                ///< Lower bound for rable read
    72     psF64 validTo                   ///< Upper bound for table read
     71    const char *format,             ///< scanf-like format string
     72    int indexCol                    ///< Column of the index vector (starting at zero)
     73);
     74
     75/** Read vectors from file
     76 *
     77 *  Read numeric vectors from ASCII text file
     78 *
     79 *  @return psArray*  New array of psVectors corresponding to the columns of the table
     80 */
     81psArray *psVectorsReadFromFile(
     82    const char* filename,            ///< File to be read
     83    const char* format               ///< scanf-like format string
     84);
     85
     86/** Import arrays of vectors into a table
     87 *
     88 *  Import array of vectors read from text file into a table structure
     89 *
     90 *  @return psLookupTable*  Lookup table structure with array vector data
     91 */
     92psLookupTable *psLookupTableImport(
     93    psLookupTable *table,            ///< Lookup table into which to import
     94    const psArray *vectors,          ///< Array of vectors
     95    int indexCol                     ///< Index of the index vector in the array of vectors
    7396);
    7497
     
    77100 *  Reads a lookup table and fills corresponding psLookupTable struct.
    78101 *
    79  *  @return psLookupTable*     New psLookupTable struct.
     102 *  @return psS32     Number of valid lines read
    80103 */
    81 psLookupTable* psLookupTableRead(
     104psS32 psLookupTableRead(
    82105    psLookupTable *table            ///< Table to read
    83106);
     
    91114 */
    92115psF64 psLookupTableInterpolate(
    93     psLookupTable *table,           ///< Table with data
     116    const psLookupTable *table,     ///< Table with data
    94117    psF64 index,                    ///< Value to be interpolated
    95     psU64 column,                   ///< Column in table to be interpolated
    96     psLookupStatusType *status      ///< Status of lookup
     118    psS32 column                    ///< Column in table to be interpolated
    97119);
    98120
     
    106128psVector* psLookupTableInterpolateAll(
    107129    psLookupTable *table,           ///< Table with data
    108     psF64 index,                    ///< Value to be interpolated
    109     psVector *stats                 ///< Vector of status for each lookup
     130    psF64 index                     ///< Value to be interpolated
    110131);
    111132
Note: See TracChangeset for help on using the changeset viewer.