PolyBoRi
BooleRing.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
31 //*****************************************************************************
32 
33 // load PolyBoRi settings
34 # include "pbori_defs.h"
35 
36 // include basic decision diagram manager interface
37 #include "CDDManager.h"
38 
39 
40 #ifndef BooleRing_h_
41 #define BooleRing_h_
42 
44 
50 class BooleRing:
52  public CTypes::auxtypes_type {
53 
54  public:
55  //-------------------------------------------------------------------------
56  // types definitions
57  //-------------------------------------------------------------------------
58 
60  typedef BooleRing self;
61 
64 
66 
74 
76  using base::ordercodes;
77 
79  BooleRing(size_type nvars = 100):
80  m_mgr(nvars) {}
81 
82  BooleRing(const manager_type& mgr):
83  m_mgr(mgr) {}
84 
87 
89  manager_type& manager() { return m_mgr; }
90 
92  const manager_type& manager() const { return m_mgr; }
93 
95  dd_type ddVariable(idx_type nvar) const { return m_mgr.ddVariable(nvar); }
96 
98  dd_type variable(idx_type nvar) const { return m_mgr.variable(nvar); }
99 
102  return m_mgr.persistentVariable(nvar);
103  }
104 
106  dd_type zero() const { return m_mgr.empty(); }
107 
109  dd_type one() const { return m_mgr.blank(); }
110 
112  size_type nVariables() const { return m_mgr.nVariables(); }
113 
115  void clearCache() { cuddCacheFlush(m_mgr.manager().getManager()); }
116 
118  void printInfo() { return m_mgr.printInfo(); }
119 
120 protected:
123 };
124 
125 
127 #endif