Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

psLookupTable.h File Reference


Detailed Description

This file defines the structure and functions for table lookups.

Author:
Ross Harman, MHPCC
Version:
Revision
1.7
Name
rel6_0
Date:
Date
2005/06/08 23:40:45
Copyright 2004 Maui High Performance Computing Center, University of Hawaii

Definition in file psLookupTable.h.

#include "psType.h"
#include "psVector.h"
#include "psArray.h"

Include dependency graph for psLookupTable.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  psLookupStatusType { PS_LOOKUP_SUCCESS = 0x0000, PS_LOOKUP_PAST_TOP = 0x0101, PS_LOOKUP_PAST_BOTTOM = 0x0102, PS_LOOKUP_ERROR = 0x0104 }
 Lookup table lookup status and error conditions. More...
enum  psParseErrorType { PS_PARSE_SUCCESS = 0x0000, PS_PARSE_ERROR_TYPE = 0x0101, PS_PARSE_ERROR_VALUE = 0x0102, PS_PARSE_ERROR_GENERAL = 0x0104 }
 Lookup table parse status and error conditions. More...

Functions

psLookupTablepsLookupTableAlloc (const char *fileName, const char *format, int indexCol)
 Allocator for psLookupTable struct.
psArraypsVectorsReadFromFile (const char *filename, const char *format)
 Read vectors from file.
psLookupTablepsLookupTableImport (psLookupTable *table, const psArray *vectors, int indexCol)
 Import arrays of vectors into a table.
psS32 psLookupTableRead (psLookupTable *table)
 Read lookup table.
psF64 psLookupTableInterpolate (const psLookupTable *table, psF64 index, psS32 column)
 Lookup and interpolate value from table.
psVectorpsLookupTableInterpolateAll (psLookupTable *table, psF64 index)
 Lookup and interpolate all values from table.


Enumeration Type Documentation

enum psLookupStatusType
 

Lookup table lookup status and error conditions.

Success, failure, and status conditions for table lookups.

Enumeration values:
PS_LOOKUP_SUCCESS  Table lookup succeeded.
PS_LOOKUP_PAST_TOP  Lookup off top of table.
PS_LOOKUP_PAST_BOTTOM  Lookup off bottom of table.
PS_LOOKUP_ERROR  Any other type of lookup error.

Definition at line 45 of file psLookupTable.h.

enum psParseErrorType
 

Lookup table parse status and error conditions.

Success, failure, and status conditions for table parsing.

Enumeration values:
PS_PARSE_SUCCESS  Table lookup succeeded.
PS_PARSE_ERROR_TYPE  Error parsing type.
PS_PARSE_ERROR_VALUE  Error parsing numerical value.
PS_PARSE_ERROR_GENERAL  Any other type of lookup error.

Definition at line 56 of file psLookupTable.h.


Function Documentation

psLookupTable* psLookupTableAlloc const char *  fileName,
const char *  format,
int  indexCol
 

Allocator for psLookupTable struct.

Allocates a new psLookupTable struct.

Returns:
psLookupTable* New psLookupTable struct.
Parameters:
fileName  Name of file to read
format  scanf-like format string
indexCol  Column of the index vector (starting at zero)

psLookupTable* psLookupTableImport psLookupTable table,
const psArray vectors,
int  indexCol
 

Import arrays of vectors into a table.

Import array of vectors read from text file into a table structure

Returns:
psLookupTable* Lookup table structure with array vector data
Parameters:
table  Lookup table into which to import
vectors  Array of vectors
indexCol  Index of the index vector in the array of vectors

psF64 psLookupTableInterpolate const psLookupTable table,
psF64  index,
psS32  column
 

Lookup and interpolate value from table.

Interpolates value from table. Sets status bit for success or one of several possible failure conditions.

Returns:
psLookupTable* New psLookupTable struct
Parameters:
table  Table with data
index  Value to be interpolated
column  Column in table to be interpolated

psVector* psLookupTableInterpolateAll psLookupTable table,
psF64  index
 

Lookup and interpolate all values from table.

Interpolates all values from table. Sets status bit for success or one of several possible failure conditions.

Returns:
psLookupTable* New psLookupTable struct
Parameters:
table  Table with data
index  Value to be interpolated

psS32 psLookupTableRead psLookupTable table  ) 
 

Read lookup table.

Reads a lookup table and fills corresponding psLookupTable struct.

Returns:
psS32 Number of valid lines read
Parameters:
table  Table to read

psArray* psVectorsReadFromFile const char *  filename,
const char *  format
 

Read vectors from file.

Read numeric vectors from ASCII text file

Returns:
psArray* New array of psVectors corresponding to the columns of the table
Parameters:
filename  File to be read
format  scanf-like format string


Generated on Wed Jun 15 11:01:06 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.1