00001 // -*- c++ -*- 00002 //***************************************************************************** 00045 //***************************************************************************** 00046 00047 // include basic definitions 00048 #include "pbori_defs.h" 00049 00050 // Get Cudd definitions 00051 #include "cudd.h" 00052 #include "extrafwd.h" 00053 00054 #include "pbori_routines.h" 00055 #include "CCacheManagement.h" 00056 00057 #ifndef CDDOperations_h_ 00058 #define CDDOperations_h_ 00059 00060 BEGIN_NAMESPACE_PBORI 00061 00064 template <class DDType, class MonomType> 00065 class CDDOperations { 00066 public: 00067 00068 // This is only a work-around, since a monomial should not be generated from 00069 // a dd. 00070 MonomType getMonomial(const DDType& dd) const { 00071 return MonomType(dd); 00072 } 00073 00074 MonomType usedVariables(const DDType& dd){ 00075 00076 // get type definitions from DDType 00077 typedef typename DDType::idx_type idx_type; 00078 typedef typename DDType::navigator navigator; 00079 typedef MonomType monom_type; 00080 00081 CCacheManagement<CCacheTypes::used_variables> cache_mgr(dd.manager()); 00082 return cached_used_vars(cache_mgr, dd.navigation(), 00083 MonomType(cache_mgr.one())); 00084 } 00085 00086 }; 00087 00088 00089 00090 END_NAMESPACE_PBORI 00091 00092 #endif