polybori::CCuddInterface Class Reference

This class defines a C++ interface to CUDD's decicion diagram manager. More...

#include <CCuddInterface.h>

Inheritance diagram for polybori::CCuddInterface:

polybori::CAuxTypes

List of all members.

Public Types

typedef DdNode * node_ptr
 Type of Cudd's decision diagrams.
typedef DdManager mgr_type
 Type of Cudd decision diagram manager.
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.

Public Member Functions

 CCuddInterface (size_type numVars, size_type numVarsZ, size_type numSlots=256, size_type cacheSize=262144, unsigned long maxMemory=0)
 Initialize CUDD-like decision diagram manager.
 CCuddInterface (const self &rhs)
 Copy constructor.
 ~CCuddInterface ()
 Destructor.
mgr_typegetManager () const
 Get pure CUDD structure.
mgr_ptr pManager () const
 Get (shared) pointer to initialized manager.
selfoperator= (const self &right)
 Assignment operation.
node_ptr zddVar (idx_type idx) const
 Get ZDD variable.
node_ptr zddOne (idx_type iMax) const
 Get 1-terminal for ZDDs.
node_ptr zddZero () const
 Get 0-terminal for ZDDs.
node_ptr zddOne () const
 Get 1-terminal for ZDDs.
 BOOST_PP_SEQ_FOR_EACH (PB_CUDDMGR_READ, int,(ReadZddSize)) node_ptr getVar(idx_type idx) const
size_type nVariables () const
 Get number of managed variables.
void cacheFlush ()
 clear all temporarily stored data

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
node_ptr checkedResult (node_ptr result) const
 Generate check result of previous node operation and convert.
void checkedResult (int result) const
 Generate check numerical result of previous operation.
node_ptr apply (unary_int_function func, idx_type idx) const
 Apply function to given index.
node_ptr apply (void_function func) const
 Call function.
void recursiveDeref (node_ptr node) const
 Dereferencing of diagram node.
void initVar (node_ptr &node, idx_type idx) const
 Generate raw variable.
template<class MemberFuncPtr>
CCallbackWrapper< MemberFuncPtr > callBack (MemberFuncPtr ptr)
 Wrapping memeber function as functional.


Detailed Description

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.

Attention:
This class is intented for internal use only. Use the highlevel classes CDDManager<CCuddInterface> or BoolePolyRing instead.

Member Typedef Documentation

Type of Cudd's decision diagrams.

Type of Cudd decision diagram manager.

typedef boost::intrusive_ptr<mgr_type> polybori::CCuddInterface::mgr_ptr

Smart pointer to Cudd manager.


Constructor & Destructor Documentation

polybori::CCuddInterface::CCuddInterface ( size_type  numVars,
size_type  numVarsZ,
size_type  numSlots = 256,
size_type  cacheSize = 262144,
unsigned long  maxMemory = 0 
) [inline]

Initialize CUDD-like decision diagram manager.

polybori::CCuddInterface::CCuddInterface ( const self rhs  )  [inline]

Copy constructor.

References Cudd_Ref, polybori::for_each(), and PBORI_PREFIX.

polybori::CCuddInterface::~CCuddInterface (  )  [inline]

Destructor.

References polybori::for_each().


Member Function Documentation

mgr_type* polybori::CCuddInterface::getManager (  )  const [inline]

Get pure CUDD structure.

mgr_ptr polybori::CCuddInterface::pManager (  )  const [inline]

Get (shared) pointer to initialized manager.

self& polybori::CCuddInterface::operator= ( const self right  )  [inline]

Assignment operation.

node_ptr polybori::CCuddInterface::zddVar ( idx_type  idx  )  const [inline]

Get ZDD variable.

References Cudd_zddIthVar, and PBORI_PREFIX.

node_ptr polybori::CCuddInterface::zddOne ( idx_type  iMax  )  const [inline]

Get 1-terminal for ZDDs.

References Cudd_ReadZddOne, and PBORI_PREFIX.

node_ptr polybori::CCuddInterface::zddZero (  )  const [inline]

Get 0-terminal for ZDDs.

References Cudd_ReadZero, and PBORI_PREFIX.

node_ptr polybori::CCuddInterface::zddOne (  )  const [inline]

Get 1-terminal for ZDDs.

polybori::CCuddInterface::BOOST_PP_SEQ_FOR_EACH ( PB_CUDDMGR_READ  ,
int  ,
(ReadZddSize)   
) const [inline]

References PBORI_UNLIKELY.

size_type polybori::CCuddInterface::nVariables (  )  const [inline]

Get number of managed variables.

void polybori::CCuddInterface::cacheFlush (  )  [inline]

clear all temporarily stored data

References cuddCacheFlush, and PBORI_PREFIX.

mgr_ptr polybori::CCuddInterface::init ( size_type  numVars,
size_type  numVarsZ,
size_type  numSlots,
size_type  cacheSize,
large_size_type  maxMemory 
) [inline, protected]

initialized CUDD decision diagrma manager, check it and start reference counting

References Cudd_Init, PBORI_PREFIX, and PBORI_UNLIKELY.

node_ptr polybori::CCuddInterface::checkedResult ( node_ptr  result  )  const [inline, protected]

Generate check result of previous node operation and convert.

void polybori::CCuddInterface::checkedResult ( int  result  )  const [inline, protected]

Generate check numerical result of previous operation.

References error_text(), and PBORI_UNLIKELY.

node_ptr polybori::CCuddInterface::apply ( unary_int_function  func,
idx_type  idx 
) const [inline, protected]

Apply function to given index.

node_ptr polybori::CCuddInterface::apply ( void_function  func  )  const [inline, protected]

Call function.

void polybori::CCuddInterface::recursiveDeref ( node_ptr  node  )  const [inline, protected]

Dereferencing of diagram node.

References Cudd_RecursiveDerefZdd, and PBORI_PREFIX.

void polybori::CCuddInterface::initVar ( node_ptr node,
idx_type  idx 
) const [inline, protected]

Generate raw variable.

References Cudd_Ref, cuddUniqueInterZdd, and PBORI_PREFIX.

template<class MemberFuncPtr>
CCallbackWrapper<MemberFuncPtr> polybori::CCuddInterface::callBack ( MemberFuncPtr  ptr  )  [inline, protected]

Wrapping memeber function as functional.


The documentation for this class was generated from the following file:

Generated on Wed Jan 30 16:39:53 2013 for PolyBoRi by  doxygen 1.5.6