abc-master
|
Go to the source code of this file.
Macros | |
#define | lqHash(key, shift) (((unsigned)(key) * DD_P1) >> (shift)) |
Functions | |
static DdQueueItem * | hashLookup (DdLevelQueue *queue, void *key) |
static int | hashInsert (DdLevelQueue *queue, DdQueueItem *item) |
static void | hashDelete (DdLevelQueue *queue, DdQueueItem *item) |
static int | hashResize (DdLevelQueue *queue) |
DdLevelQueue * | cuddLevelQueueInit (int levels, int itemSize, int numBuckets) |
void | cuddLevelQueueQuit (DdLevelQueue *queue) |
void * | cuddLevelQueueEnqueue (DdLevelQueue *queue, void *key, int level) |
void | cuddLevelQueueDequeue (DdLevelQueue *queue, int level) |
Variables | |
static ABC_NAMESPACE_IMPL_START char rcsid[] | DD_UNUSED = "$Id: cuddLevelQ.c,v 1.13 2009/03/08 02:49:02 fabio Exp $" |
Macro***********************************************************************
Synopsis [Hash function for the table of a level queue.]
Description [Hash function for the table of a level queue.]
SideEffects [None]
SeeAlso [hashInsert hashLookup hashDelete]
Definition at line 128 of file cuddLevelQ.c.
void cuddLevelQueueDequeue | ( | DdLevelQueue * | queue, |
int | level | ||
) |
Function********************************************************************
Synopsis [Remove an item from the front of a level queue.]
Description [Remove an item from the front of a level queue.]
SideEffects [None]
SeeAlso [cuddLevelQueueEnqueue]
Definition at line 354 of file cuddLevelQ.c.
void* cuddLevelQueueEnqueue | ( | DdLevelQueue * | queue, |
void * | key, | ||
int | level | ||
) |
Function********************************************************************
Synopsis [Inserts a new key in a level queue.]
Description [Inserts a new key in a level queue. A new entry is created in the queue only if the node is not already enqueued. Returns a pointer to the queue item if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [cuddLevelQueueInit cuddLevelQueueDequeue]
Definition at line 282 of file cuddLevelQ.c.
DdLevelQueue* cuddLevelQueueInit | ( | int | levels, |
int | itemSize, | ||
int | numBuckets | ||
) |
AutomaticEnd Function********************************************************************
Synopsis [Initializes a level queue.]
Description [Initializes a level queue. A level queue is a queue where inserts are based on the levels of the nodes. Within each level the policy is FIFO. Level queues are useful in traversing a BDD top-down. Queue items are kept in a free list when dequeued for efficiency. Returns a pointer to the new queue if successful; NULL otherwise.]
SideEffects [None]
SeeAlso [cuddLevelQueueQuit cuddLevelQueueEnqueue cuddLevelQueueDequeue]
Definition at line 169 of file cuddLevelQ.c.
void cuddLevelQueueQuit | ( | DdLevelQueue * | queue | ) |
Function********************************************************************
Synopsis [Shuts down a level queue.]
Description [Shuts down a level queue and releases all the associated memory.]
SideEffects [None]
SeeAlso [cuddLevelQueueInit]
Definition at line 244 of file cuddLevelQ.c.
|
static |
Function********************************************************************
Synopsis [Removes an item from the hash table of a level queue.]
Description [Removes an item from the hash table of a level queue. Nothing is done if the item is not in the table.]
SideEffects [None]
SeeAlso [cuddLevelQueueDequeue hashInsert]
Definition at line 467 of file cuddLevelQ.c.
|
static |
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]
Definition at line 433 of file cuddLevelQ.c.
|
static |
AutomaticStart
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]
Definition at line 398 of file cuddLevelQ.c.
|
static |
Function********************************************************************
Synopsis [Resizes the hash table of a level queue.]
Description [Resizes the hash table of a level queue. Returns 1 if successful; 0 otherwise.]
SideEffects [None]
SeeAlso [hashInsert]
Definition at line 508 of file cuddLevelQ.c.
|
static |
CFile***********************************************************************
FileName [cuddLevelQ.c]
PackageName [cudd]
Synopsis [Procedure to manage level queues.]
Description [The functions in this file allow an application to easily manipulate a queue where nodes are prioritized by level. The emphasis is on efficiency. Therefore, the queue items can have variable size. If the application does not need to attach information to the nodes, it can declare the queue items to be of type DdQueueItem. Otherwise, it can declare them to be of a structure type such that the first three fields are data pointers. The third pointer points to the node. The first two pointers are used by the level queue functions. The remaining fields are initialized to 0 when a new item is created, and are then left to the exclusive use of the application. On the DEC Alphas the three pointers must be 32-bit pointers when CUDD is compiled with 32-bit pointers. The level queue functions make sure that each node appears at most once in the queue. They do so by keeping a hash table where the node is used as key. Queue items are recycled via a free list for efficiency.
Internal procedures provided by this module:
Static procedures included in this module:
]
SeeAlso []
Author [Fabio Somenzi]
Copyright [Copyright (c) 1995-2004, Regents of the University of Colorado
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.]
Definition at line 105 of file cuddLevelQ.c.