PolyBoRi
|
This class defines a C++ interface to CUDD's
decicion diagram manager.
More...
#include <CCuddInterface.h>
Public Types | |
typedef DdNode * | node_ptr |
Type of Cudd's decision diagrams. More... | |
typedef DdManager | mgr_type |
Type of Cudd decision diagram manager. More... | |
typedef int | cudd_idx_type |
typedef node_ptr(* | unary_int_function) (mgr_type *, cudd_idx_type) |
typedef node_ptr(* | void_function) (mgr_type *) |
typedef boost::intrusive_ptr< mgr_type > | mgr_ptr |
Smart pointer to Cudd manager. More... | |
![]() | |
typedef bool | bool_type |
Type for standard true/false statements. More... | |
typedef std::size_t | size_type |
Type for lengths, dimensions, etc. More... | |
typedef int | deg_type |
Type for polynomial degrees (ranges from -1 to maxint) More... | |
typedef int | integer_type |
Type for integer numbers. More... | |
typedef int | idx_type |
Type for indices. More... | |
typedef std::size_t | hash_type |
Type for hashing. More... | |
typedef unsigned int | errornum_type |
Type used to store error codes. More... | |
typedef short int | comp_type |
Type for comparisons. More... | |
typedef int | ordercode_type |
Type for ordering codes. More... | |
typedef const char * | errortext_type |
Type used to verbose error information. More... | |
typedef std::ostream | ostream_type |
Type for out-stream. More... | |
typedef const char * | vartext_type |
Type for setting/getting names of variables. More... | |
typedef unsigned long | large_size_type |
large size_type (necessary?) More... | |
typedef std::size_t | refcount_type |
Type for counting references. More... | |
Public Member Functions | |
CCuddInterface (size_type numVars, size_type numVarsZ, size_type numSlots=CUDD_UNIQUE_SLOTS, size_type cacheSize=CUDD_CACHE_SLOTS, unsigned long maxMemory=0) | |
Initialize CUDD-like decision diagram manager. More... | |
CCuddInterface (const self &rhs) | |
Copy constructor. More... | |
~CCuddInterface () | |
Destructor. More... | |
mgr_type * | getManager () const |
Get pure CUDD structure. More... | |
mgr_ptr | pManager () const |
Get (shared) pointer to initialized manager. More... | |
self & | operator= (const self &right) |
Assignment operation. More... | |
node_ptr | zddVar (idx_type idx) const |
Get ZDD variable. More... | |
node_ptr | zddOne (idx_type iMax) const |
Get 1-terminal for ZDDs. More... | |
node_ptr | zddZero () const |
Get 0-terminal for ZDDs. More... | |
node_ptr | zddOne () const |
Get 1-terminal for ZDDs. More... | |
node_ptr | getVar (idx_type idx) const |
size_type | nVariables () const |
Get number of managed variables. More... | |
void | cacheFlush () |
clear all temporarily stored data More... | |
Protected Member Functions | |
mgr_ptr | init (size_type numVars, size_type numVarsZ, size_type numSlots, size_type cacheSize, large_size_type maxMemory) |
initialized CUDD decision diagrma manager, check it and start reference counting More... | |
node_ptr | checkedResult (node_ptr result) const |
Generate check result of previous node operation and convert. More... | |
void | checkedResult (int result) const |
Generate check numerical result of previous operation. More... | |
node_ptr | apply (unary_int_function func, idx_type idx) const |
Apply function to given index. More... | |
node_ptr | apply (void_function func) const |
Call function. More... | |
void | recursiveDeref (node_ptr node) const |
Dereferencing of diagram node. More... | |
void | initVar (node_ptr &node, idx_type idx) const |
Generate raw variable. More... | |
template<class MemberFuncPtr > | |
CCallbackWrapper< MemberFuncPtr > | callBack (MemberFuncPtr ptr) |
Wrapping memeber function as functional. More... | |
This class defines a C++ interface to CUDD's
decicion diagram manager.
The purpose of this wrapper is just to provide an efficient and save way of handling the decision diagram management. It corrects some short-comings of CUDD's built-in interface.
typedef int polybori::CCuddInterface::cudd_idx_type |
typedef boost::intrusive_ptr<mgr_type> polybori::CCuddInterface::mgr_ptr |
Smart pointer to Cudd manager.
Type of Cudd decision diagram manager.
typedef DdNode* polybori::CCuddInterface::node_ptr |
Type of Cudd's decision diagrams.
typedef node_ptr(* polybori::CCuddInterface::unary_int_function) (mgr_type *, cudd_idx_type) |
|
inline |
Initialize CUDD-like decision diagram manager.
|
inline |
Copy constructor.
References Cudd_Ref, polybori::for_each(), and PBORI_PREFIX.
|
inline |
Destructor.
References polybori::for_each().
|
inlineprotected |
Apply function to given index.
|
inlineprotected |
Call function.
|
inline |
clear all temporarily stored data
References cuddCacheFlush, and PBORI_PREFIX.
|
inlineprotected |
Wrapping memeber function as functional.
Generate check result of previous node operation and convert.
|
inlineprotected |
Generate check numerical result of previous operation.
References error_text(), and PBORI_UNLIKELY.
|
inline |
Get pure CUDD structure.
References PBORI_UNLIKELY.
|
inlineprotected |
initialized CUDD decision diagrma manager, check it and start reference counting
References Cudd_Init, PBORI_PREFIX, and PBORI_UNLIKELY.
Generate raw variable.
References Cudd_Ref, cuddUniqueInterZdd, and PBORI_PREFIX.
|
inline |
Get number of managed variables.
|
inline |
Get (shared) pointer to initialized manager.
|
inlineprotected |
Dereferencing of diagram node.
References Cudd_RecursiveDerefZdd, and PBORI_PREFIX.
Get 1-terminal for ZDDs.
References Cudd_ReadZddOne, and PBORI_PREFIX.
|
inline |
Get 1-terminal for ZDDs.
Get ZDD variable.
References Cudd_zddIthVar, and PBORI_PREFIX.
|
inline |
Get 0-terminal for ZDDs.
References Cudd_ReadZero, and PBORI_PREFIX.