PolyBoRi
CDDOperations.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
48 //*****************************************************************************
49 
50 // include basic definitions
51 #include "pbori_defs.h"
52 
53 // Get Cudd definitions
54 #include "cudd.h"
55 #include "extrafwd.h"
56 
57 #include "pbori_routines.h"
58 #include "CCacheManagement.h"
59 
60 #ifndef CDDOperations_h_
61 #define CDDOperations_h_
62 
64 
67 template <class DDType, class MonomType>
69 public:
70 
71  // This is only a work-around, since a monomial should not be generated from
72  // a dd.
73  MonomType getMonomial(const DDType& dd) const {
74  return MonomType(dd);
75  }
76 
77  MonomType usedVariables(const DDType& dd){
78 
79  // get type definitions from DDType
80  typedef typename DDType::idx_type idx_type;
81  typedef typename DDType::navigator navigator;
82  typedef MonomType monom_type;
83 
84  CCacheManagement<CCacheTypes::used_variables> cache_mgr(dd.manager());
85  return cached_used_vars(cache_mgr, dd.navigation(),
86  MonomType(cache_mgr.one()));
87 }
88 
89 };
90 
91 
92 
94 
95 #endif