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

  Synopsis    [Inserts an item in the hash table of a level queue.]

  Description [Inserts an item in the hash table of a level queue. Returns
  1 if successful; 0 otherwise. No check is performed to see if an item with
  the same key is already in the hash table.]

  SideEffects [None]

  SeeAlso     [cuddLevelQueueEnqueue]

******************************************************************************/
Function
Synopsis    [Inserts an item in the hash table of a level queue.]

Description [Inserts an item in the hash table of a level queue. Returns
1 if successful; 0 otherwise. No check is performed to see if an item with
the same key is already in the hash table.]




Function Synopsis [ Inserts an item in the hash table of a level queue . ] Description [ Inserts an item in the hash table of a level queue . Returns 1 if successful ; 0 otherwise . No check is performed to see if an item with the same key is already in the hash table . ]
static int
hashInsert(
  DdLevelQueue * queue,
  DdQueueItem * item)
{
    int result;
    int posn;
    if (queue->size > queue->maxsize) {
        result = hashResize(queue);
        if (result == 0) return(0);
    }
    posn = lqHash(item->key,queue->shift);
    item->cnext = queue->buckets[posn];
    queue->buckets[posn] = item;
    return(1);
}
static int hashInsert ( DdLevelQueue * queue , DdQueueItem * item ) { int result ; int posn ; if ( queue -> size > queue -> maxsize ) { result = hashResize ( queue ) ; if ( result == 0 ) return ( 0 ) ; } posn = lqHash ( item -> key , queue -> shift ) ; item -> cnext = queue -> buckets [ posn ] ; queue -> buckets [ posn ] = item ; return ( 1 ) ; }
Function
Synopsis    [Inserts an item in the hash table of a level queue.]
Function Synopsis [ Inserts an item in the hash table of a level queue . ]