IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1581


Ignore:
Timestamp:
Aug 18, 2004, 4:10:27 PM (22 years ago)
Author:
Paul Price
Message:

Updating from SDRS.

Location:
trunk/archive/pslib/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psBitset.h

    r753 r1581  
    2222;
    2323
    24 /** Destructor */
    25 void psBitsetFree(psBitset *restrict myBits) ///< bitset to destroy
    26 ;
    27 
    2824/************************************************************************************************************/
    2925
    3026/** Set a bitset */
    3127psBitset *
    32 psBitsetSet(psBitset *restrict myBits,  ///< Input bitset
    33              int bit)                   ///< Bit to set
     28psBitsetSet(psBitset *myBits,           ///< Input bitset
     29            int bit)                    ///< Bit to set
    3430;
    3531
    3632/** Check a bitset.  Returns true or false */
    37 int
    38 psBitsetTest(const psBitset *restrict checkBits, ///< bitset to check
    39               int bit)                  ///< Bit to check
     33bool
     34psBitsetTest(const psBitset *checkBits, ///< bitset to check
     35             int bit)                   ///< Bit to check
    4036;
    4137
     
    4339psBitset *
    4440psBitsetOp(psBitset *outBits,           ///< Output bitset or NULL
    45             const psBitset *restrict inBits1, ///< Input bitset 1
    46             char *operator,             ///< bitset operator (AND, OR, XOR)
    47             const psBitset *restrict inBits2) ///< Input bitset 2
     41           const psBitset *inBits1,     ///< Input bitset 1
     42           char *operator,              ///< bitset operator (AND, OR, XOR)
     43           const psBitset *inBits2)     ///< Input bitset 2
    4844;
    4945
  • trunk/archive/pslib/include/psHash.h

    r359 r1581  
    77 */
    88
    9 /** DO WE NEED TO DEFINE HashTable? */
    10 typedef struct HashTable psHash;        ///< Opaque type for a hash table
     9/** A hash table */
     10typedef struct {
     11    int nbucket;                        ///< number of buckets
     12    psHashBucket **buckets;             ///< the buckets themselves
     13} psHash;
     14
     15/** The hash buckets, which compose the hash */
     16typedef struct psHashBucket {
     17    char *key;                          ///< key for this item of data
     18    void *data;                         ///< the data itself
     19    struct psHashBucket *next;          ///< list of other possible keys
     20} psHashBucket;
    1121
    1222/** Functions **************************************************************/
     
    1525 */
    1626
    17 /// Allocate hash buckets in table.
     27/** Allocate hash buckets in table. */
    1828psHash *psHashAlloc(void);
    1929
    20 /// Free hash buckets from table.
    21 void psHashFree(psHash *table,          ///< hash table to be freed
    22                 void (*itemFree)(void *item) ///< how to free hashed data; or NULL
     30/** Add entry to table. */
     31bool psHashAdd(psHash *table,           ///< table to insert in
     32               const char *key,         ///< key to use
     33               void *data               ///< data to insert
    2334    );
    2435
    25 /// Insert entry into table.
    26 void *psHashInsert(psHash *table,       ///< table to insert in
    27                    const char *key,     ///< key to use
    28                    void *data,          ///< data to insert
    29                    void (*itemFree)(void *item) ///< how to free hashed data; or NULL
    30     );
    31 
    32 /// Lookup key in table.
     36/** Lookup key in table. */
    3337void *psHashLookup(psHash *table,       ///< table to lookup key in
    3438                   const char *key      ///< key to lookup
    3539    );
    3640
    37 /// Remove key from table.
    38 void *psHashRemove(psHash *table,       ///< table to lookup key in
    39                    const char *key      ///< key to lookup
     41/** Remove key from table. */
     42bool psHashRemove(psHash *table,        ///< table to lookup key in
     43                  const char *key       ///< key to lookup
    4044    );
     45
     46/** Get list of keys */
     47psList *psHashKeyList(psHash *table     ///< table for which to get keys
     48    );
     49
    4150
    4251/* \} */ // End of DataGroup Functions
  • trunk/archive/pslib/include/psSort.h

    r671 r1581  
    1515psVector *
    1616psSort(psVector *out,                   ///< Sorted array to return. May be NULL
    17        const psVector *restrict in)     ///< Array to sort
     17       const psVector *in)              ///< Array to sort
    1818;
    1919
    2020/** Sort an array, along with some other stuff.  Returns an index array */
    2121psVector *
    22 psSortIndex(psVector *restrict out,     ///< Output index array (may be NULL)
    23             const psVector *restrict in) ///< Array to sort
     22psSortIndex(psVector *out,              ///< Output index array (may be NULL)
     23            const psVector *in)         ///< Array to sort
    2424;
    2525
Note: See TracChangeset for help on using the changeset viewer.