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