abc/src/bdd/cudd/cuddLevelQ.c
/**Function********************************************************************

  Synopsis    [Looks up a key in the hash table of a level queue.]

  Description [Looks up a key in the hash table of a level queue. Returns
  a pointer to the item with the given key if the key is found; NULL
  otherwise.]

  SideEffects [None]

  SeeAlso     [cuddLevelQueueEnqueue hashInsert]

******************************************************************************/
Function
Synopsis    [Looks up a key in the hash table of a level queue.]

Description [Looks up a key in the hash table of a level queue. Returns
a pointer to the item with the given key if the key is found; NULL
otherwise.]




Function Synopsis [ Looks up a key in the hash table of a level queue . ] Description [ Looks up a key in the hash table of a level queue . Returns a pointer to the item with the given key if the key is found ; NULL otherwise . ]
static DdQueueItem *
hashLookup(
  DdLevelQueue * queue,
  void * key)
{
    int posn;
    DdQueueItem *item;
    posn = lqHash(key,queue->shift);
    item = queue->buckets[posn];
    while (item != NULL) {
        if (item->key == key) {
            return(item);
        }
        item = item->cnext;
    }
    return(NULL);
}
static DdQueueItem * hashLookup ( DdLevelQueue * queue , void * key ) { int posn ; DdQueueItem * item ; posn = lqHash ( key , queue -> shift ) ; item = queue -> buckets [ posn ] ; while ( item != NULL ) { if ( item -> key == key ) { return ( item ) ; } item = item -> cnext ; } return ( NULL ) ; }
Function
Synopsis    [Looks up a key in the hash table of a level queue.]
Function Synopsis [ Looks up a key in the hash table of a level queue . ]