Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a24e1a39141f9b4ca49bd1e2e23a54ba > files > 33

polybori-doc-0.5rc.p9-6mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PolyBoRi: BooleVariable.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>BooleVariable.h</h1><a href="BooleVariable_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">//*****************************************************************************</span>
<a name="l00089"></a>00089 <span class="comment"></span><span class="comment">//*****************************************************************************</span>
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="preprocessor">#ifndef BooleVariable_h_</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#define BooleVariable_h_</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>
<a name="l00094"></a>00094 <span class="comment">// include basic definitions</span>
<a name="l00095"></a>00095 <span class="preprocessor">#include "<a class="code" href="pbori__defs_8h.html">pbori_defs.h</a>"</span>
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="comment">// get BoolePolynomial's definition</span>
<a name="l00098"></a>00098 <span class="preprocessor">#include "<a class="code" href="BooleEnv_8h.html">BooleEnv.h</a>"</span>
<a name="l00099"></a>00099 <span class="preprocessor">#include "<a class="code" href="BoolePolynomial_8h.html">BoolePolynomial.h</a>"</span>
<a name="l00100"></a>00100 
<a name="l00101"></a>00101 <a class="code" href="pbori__defs_8h.html#6ae360a591580558f31b6157ee792a10" title="Start project&amp;#39;s namespace.">BEGIN_NAMESPACE_PBORI</a>
<a name="l00102"></a>00102 
<a name="l00111"></a><a class="code" href="classpolybori_1_1BooleVariable.html">00111</a> <span class="keyword">class </span><a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a> {
<a name="l00112"></a>00112 
<a name="l00113"></a>00113  <span class="keyword">public</span>:
<a name="l00114"></a>00114   <span class="comment">//-------------------------------------------------------------------------</span>
<a name="l00115"></a>00115   <span class="comment">// types definitions</span>
<a name="l00116"></a>00116   <span class="comment">//-------------------------------------------------------------------------</span>
<a name="l00117"></a>00117 
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="classpolybori_1_1BooleVariable.html#2c884f5af19dc65ff0d15a28ef4d1fbd">00120</a>   <span class="keyword">typedef</span> <a class="code" href="classpolybori_1_1CDDInterface.html">CTypes::dd_type</a> <a class="code" href="classpolybori_1_1CDDInterface.html">dd_type</a>;
<a name="l00121"></a><a class="code" href="classpolybori_1_1BooleVariable.html#b3fdbb694fcbfe4367dea2a889b19338">00121</a>   <span class="keyword">typedef</span> CTypes::size_type size_type;
<a name="l00122"></a><a class="code" href="classpolybori_1_1BooleVariable.html#1ed91bd57e6eaca61780a6855edcd9b2">00122</a>   <span class="keyword">typedef</span> <a class="code" href="namespacepolybori_1_1groebner.html#ef37a95e97afbd561cc4c5f84d660765">CTypes::idx_type</a> <a class="code" href="namespacepolybori_1_1groebner.html#ef37a95e97afbd561cc4c5f84d660765">idx_type</a>;
<a name="l00124"></a>00124 
<a name="l00126"></a><a class="code" href="classpolybori_1_1BooleVariable.html#c96bed835a6283828d1ae4999e2c19c9">00126</a>   <span class="keyword">typedef</span> <a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a> <span class="keyword">self</span>;
<a name="l00127"></a>00127   
<a name="l00129"></a><a class="code" href="classpolybori_1_1BooleVariable.html#ca3810ce325ca3a6a9afbe8ba93ce4be">00129</a>   <span class="keyword">typedef</span> <a class="code" href="classpolybori_1_1BooleSet.html">BooleSet</a> <a class="code" href="classpolybori_1_1BooleSet.html">set_type</a>;
<a name="l00130"></a>00130 
<a name="l00132"></a><a class="code" href="classpolybori_1_1BooleVariable.html#1d142ed693a2b563411ccb69a44c3b53">00132</a>   <span class="keyword">typedef</span> <a class="code" href="classpolybori_1_1BooleRing.html" title="This class is just a wrapper for reinterpreting decicion diagram managers as Boolean...">BooleRing</a> <a class="code" href="classpolybori_1_1BooleRing.html" title="This class is just a wrapper for reinterpreting decicion diagram managers as Boolean...">ring_type</a>;
<a name="l00133"></a>00133 
<a name="l00135"></a><a class="code" href="classpolybori_1_1BooleVariable.html#7bf7436ea11b7ce9fcbb2f25aa03f041">00135</a>   <span class="keyword">explicit</span> <a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a>(<a class="code" href="namespacepolybori_1_1groebner.html#ef37a95e97afbd561cc4c5f84d660765">idx_type</a> idx = 0):
<a name="l00136"></a>00136     m_poly( <a class="code" href="classpolybori_1_1BooleEnv.html" title="This class is just a wrapper accessing global structures.">BooleEnv</a>::persistentVariable(idx) ) {}
<a name="l00137"></a>00137 
<a name="l00139"></a><a class="code" href="classpolybori_1_1BooleVariable.html#0bb70694e6e009e4e8ae773d726efe8d">00139</a>   <a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a>(<a class="code" href="namespacepolybori_1_1groebner.html#ef37a95e97afbd561cc4c5f84d660765">idx_type</a> idx, <span class="keyword">const</span> <a class="code" href="classpolybori_1_1BooleRing.html" title="This class is just a wrapper for reinterpreting decicion diagram managers as Boolean...">ring_type</a>&amp; ring):
<a name="l00140"></a>00140     m_poly( ring.persistentVariable(idx) ) {}
<a name="l00141"></a>00141 
<a name="l00142"></a>00142   
<a name="l00144"></a><a class="code" href="classpolybori_1_1BooleVariable.html#d6388cf5fb4877b852a06acc03e87567">00144</a>   <a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a>(<span class="keyword">const</span> <span class="keyword">self</span>&amp; rhs):  
<a name="l00145"></a>00145     m_poly(rhs.m_poly) {}
<a name="l00146"></a>00146 
<a name="l00148"></a><a class="code" href="classpolybori_1_1BooleVariable.html#1c8dd6e999f9b9ce2eaa5e58ffba600e">00148</a>   operator const BoolePolynomial&amp;()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_poly; }
<a name="l00149"></a>00149 
<a name="l00151"></a><a class="code" href="classpolybori_1_1BooleVariable.html#56ca92c1b7fd29f710326015590ea759">00151</a>   <a class="code" href="namespacepolybori_1_1groebner.html#ef37a95e97afbd561cc4c5f84d660765">idx_type</a> <a class="code" href="classpolybori_1_1BooleVariable.html#56ca92c1b7fd29f710326015590ea759" title="Get index of the variable.">index</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *m_poly.firstBegin(); }
<a name="l00152"></a>00152 
<a name="l00154"></a><a class="code" href="classpolybori_1_1BooleVariable.html#52df0063c53276ee28db23da1822698e">00154</a>   <span class="keywordtype">bool</span> <a class="code" href="namespacepolybori.html#d7b7beadb4e8021c43d72dd8e851d27c" title="Equality check (with constant lhs).">operator== </a>(<span class="keyword">const</span> <span class="keyword">self</span>&amp; other)<span class="keyword"> const</span>{
<a name="l00155"></a>00155       <span class="keywordflow">return</span> m_poly==other.m_poly;
<a name="l00156"></a>00156   }
<a name="l00157"></a><a class="code" href="classpolybori_1_1BooleVariable.html#4965f68d2abdc06be3cafdd2c9739258">00157</a>   <span class="keywordtype">bool</span> <a class="code" href="namespacepolybori.html#9fc517d3020e8a2b95bcfccee4c20fb2" title="Nonquality check (with constant lhs).">operator!= </a>(<span class="keyword">const</span> <span class="keyword">self</span>&amp; other)<span class="keyword"> const</span>{
<a name="l00158"></a>00158         <span class="keywordflow">return</span> m_poly!=other.m_poly;
<a name="l00159"></a>00159   }
<a name="l00160"></a><a class="code" href="classpolybori_1_1BooleVariable.html#1c6cf0f3bdbc1212cf3dde8398b7d6e2">00160</a>   <a class="code" href="classpolybori_1_1BooleSet.html">set_type</a> <span class="keyword">set</span>() <span class="keyword">const</span> { <span class="keywordflow">return</span> m_poly.set(); }
<a name="l00161"></a>00161 
<a name="l00163"></a><a class="code" href="classpolybori_1_1BooleVariable.html#117631815e88038906cf170e08dcb89e">00163</a>   <a class="code" href="classpolybori_1_1BooleRing.html" title="This class is just a wrapper for reinterpreting decicion diagram managers as Boolean...">ring_type</a> <a class="code" href="classpolybori_1_1BooleVariable.html#117631815e88038906cf170e08dcb89e" title="Access ring, where this belongs to.">ring</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_poly.ring(); } 
<a name="l00164"></a>00164 
<a name="l00165"></a>00165 <span class="keyword">private</span>:
<a name="l00166"></a>00166   <a class="code" href="classpolybori_1_1BoolePolynomial.html" title="This class wraps the underlying decicion diagram type and defines the necessary operations...">BoolePolynomial</a> m_poly;
<a name="l00167"></a>00167 };
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 <span class="keyword">inline</span> BoolePolynomial
<a name="l00172"></a><a class="code" href="namespacepolybori.html#f116f5cba35a5a81ced8349dc17cfe3b">00172</a> <a class="code" href="namespacepolybori.html#b898153f8dea82bdd23d6ccdb280f887" title="Division of monomials.">operator/</a>(<span class="keyword">const</span> <a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a>&amp; lhs, <span class="keyword">const</span> <a class="code" href="classpolybori_1_1BooleVariable.html" title="This class is just a wrapper for using variables from cudd&amp;#39;s decicion diagram...">BooleVariable</a>&amp; rhs) {
<a name="l00173"></a>00173   <span class="keywordflow">return</span> <a class="code" href="classpolybori_1_1BoolePolynomial.html" title="This class wraps the underlying decicion diagram type and defines the necessary operations...">BoolePolynomial</a>(<a class="code" href="classpolybori_1_1BooleConstant.html" title="This class wraps a bool value, which was not converted to a boolean polynomial or...">BooleConstant</a>(lhs == rhs), lhs.<a class="code" href="classpolybori_1_1BooleVariable.html#117631815e88038906cf170e08dcb89e" title="Access ring, where this belongs to.">ring</a>());
<a name="l00174"></a>00174 }
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 
<a name="l00178"></a>00178 <a class="code" href="pbori__defs_8h.html#faf094fde6c1a7f1aad18bcb455f3b06" title="Finish project&amp;#39;s namespace.">END_NAMESPACE_PBORI</a>
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 <span class="preprocessor">#endif // of BooleVariable_h_</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 9 14:30:52 2009 for PolyBoRi by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>