/usr/include/polybori/BooleRing.h is in libpolybori-dev 0.5~rc1-2.1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | // -*- c++ -*-
//*****************************************************************************
/** @file BooleRing.h
*
* @author Alexander Dreyer
* @date 2008-03-02
*
* This file the class BooleRing, where carries the definition of a
* polynomial ring over Booleans.
*
* @par Copyright:
* (c) 2008 by The PolyBoRi Team
*
* @internal
* @version \$Id: BooleRing.h,v 1.5 2008/07/08 21:41:58 alexanderdreyer Exp $
*
* @par History:
* @verbatim
* $Log: BooleRing.h,v $
* Revision 1.5 2008/07/08 21:41:58 alexanderdreyer
* Merge: from developer's repository
*
* Revision 1.2 2008/03/03 18:07:19 dreyer
* Fix: missing things in Python-interface
*
* Revision 1.1 2008/03/02 23:45:34 dreyer
* CHANGED: added contructors for given ring
*
* @endverbatim
**/
//*****************************************************************************
// load PolyBoRi settings
# include "pbori_defs.h"
// include basic decision diagram manager interface
#include "CDDManager.h"
#ifndef BooleRing_h_
#define BooleRing_h_
BEGIN_NAMESPACE_PBORI
/** @class BooleRing
* @brief This class is just a wrapper for reinterpreting decicion diagram
* managers as Boolean polynomial rings.
*
**/
class BooleRing:
public CTypes::orderenums_type, public CTypes::compenums_type,
public CTypes::auxtypes_type {
public:
//-------------------------------------------------------------------------
// types definitions
//-------------------------------------------------------------------------
/// generic access to current type
typedef BooleRing self;
/// generic access to base type
typedef CTypes::orderenums_type base;
/// @name adopt global type definitions
//@{
typedef CTypes::ordercode_type ordercode_type;
typedef CTypes::manager_type manager_type;
typedef CTypes::manager_reference manager_reference;
typedef CTypes::manager_ptr manager_ptr;
typedef CTypes::dd_type dd_type;
typedef CTypes::vartext_type vartext_type;
//@}
/// Explicitely mention ordercodes' enumeration
using base::ordercodes;
/// Constructor for @em nvars variables
BooleRing(size_type nvars = 100):
m_mgr(nvars) {}
BooleRing(const manager_type& mgr):
m_mgr(mgr) {}
/// destructor
~BooleRing() {}
/// Access to decision diagram manager
manager_type& manager() { return m_mgr; }
/// Constant access to decision diagram manager
const manager_type& manager() const { return m_mgr; }
/// Access nvar-th variable of decision diagram manager
dd_type ddVariable(idx_type nvar) const { return m_mgr.ddVariable(nvar); }
/// Access nvar-th ring variable
dd_type variable(idx_type nvar) const { return m_mgr.variable(nvar); }
/// Access nvar-th ring variable
dd_type persistentVariable(idx_type nvar) const {
return m_mgr.persistentVariable(nvar);
}
/// Get empty decision diagram
dd_type zero() const { return m_mgr.empty(); }
/// Get decision diagram with all variables negated
dd_type one() const { return m_mgr.blank(); }
/// Get number of ring variables
size_type nVariables() const { return m_mgr.nVariables(); }
/// Clears the function cache
void clearCache() { cuddCacheFlush(m_mgr.manager().getManager()); }
/// Print out statistics and settings for current ring
void printInfo() { return m_mgr.printInfo(); }
protected:
/// Interprete @c m_mgr as structure of Boolean polynomial ring
manager_type m_mgr;
};
END_NAMESPACE_PBORI
#endif
|