61 lines
14 KiB
HTML
61 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>OR-Tools</title>
|
|
<meta http-equiv="Content-Type" content="text/html;"/>
|
|
<meta charset="utf-8"/>
|
|
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
|
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">OR-Tools 7.1@</span>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<!-- Generated by Doxygen 1.8.15 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related 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 id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_ed7866a075c77e634cb451a432014e49.html">com</a></li><li class="navelem"><a class="el" href="dir_ed93e231cce03906e5c9f1a0e4259679.html">google</a></li><li class="navelem"><a class="el" href="dir_e79f93676144f0f6b8f1180b80d43c5b.html">ortools</a></li><li class="navelem"><a class="el" href="dir_e5ee533e9c8def55a36155ecb53c6410.html">sat</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">NotBooleanVariable.java</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="NotBooleanVariable_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Copyright 2010-2018 Google LLC</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// You may obtain a copy of the License at</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// limitations under the License.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">package </span>com.google.ortools.sat;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html"> 20</a></span> <span class="keyword">public</span> <span class="keyword">final</span> <span class="keyword">class </span><a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html">NotBooleanVariable</a> <span class="keyword">implements</span> <a class="code" href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html">Literal</a> {</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#a0c15b383dfe371135f1106c480ea019b"> 21</a></span>  <span class="keyword">public</span> <a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#a0c15b383dfe371135f1106c480ea019b">NotBooleanVariable</a>(<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html">IntVar</a> boolVar) {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  this.boolVar = boolVar;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  }</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  @Override</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#ae453472830fd171a77afd440c25bc55d"> 27</a></span>  <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#ae453472830fd171a77afd440c25bc55d">getIndex</a>() {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">return</span> -boolVar.<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html#a49d108125696400e851418c655de4a6b">getIndex</a>() - 1;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  }</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  @Override</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#ae49d3ac91a2d4c5757cea041794e9505"> 33</a></span>  <span class="keyword">public</span> <a class="code" href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html">Literal</a> <a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#ae49d3ac91a2d4c5757cea041794e9505">not</a>() {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keywordflow">return</span> boolVar;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  }</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  @Override</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#aa97c6666b77683360cf63c94600d583b"> 39</a></span>  <span class="keyword">public</span> String <a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#aa97c6666b77683360cf63c94600d583b">getShortString</a>() {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordflow">return</span> <span class="stringliteral">"not("</span> + boolVar.<a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html#aa9301cf7d1fa5f0994bb64186bd056c4">getShortString</a>() + <span class="stringliteral">")"</span>;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  }</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keyword">private</span> <span class="keyword">final</span> <a class="code" href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html">IntVar</a> boolVar;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> }</div><div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html">com.google.ortools.sat.NotBooleanVariable</a></div><div class="ttdoc">The negation of a boolean variable.</div><div class="ttdef"><b>Definition:</b> <a href="NotBooleanVariable_8java_source.html#l00020">NotBooleanVariable.java:20</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html_a49d108125696400e851418c655de4a6b"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html#a49d108125696400e851418c655de4a6b">com.google.ortools.sat.IntVar.getIndex</a></div><div class="ttdeci">int getIndex()</div><div class="ttdoc">Internal, returns the index of the variable in the underlying CpModelProto.</div><div class="ttdef"><b>Definition:</b> <a href="com_2google_2ortools_2sat_2IntVar_8java_source.html#l00045">com/google/ortools/sat/IntVar.java:45</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable_html_a0c15b383dfe371135f1106c480ea019b"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#a0c15b383dfe371135f1106c480ea019b">com.google.ortools.sat.NotBooleanVariable.NotBooleanVariable</a></div><div class="ttdeci">NotBooleanVariable(IntVar boolVar)</div><div class="ttdef"><b>Definition:</b> <a href="NotBooleanVariable_8java_source.html#l00021">NotBooleanVariable.java:21</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable_html_ae453472830fd171a77afd440c25bc55d"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#ae453472830fd171a77afd440c25bc55d">com.google.ortools.sat.NotBooleanVariable.getIndex</a></div><div class="ttdeci">int getIndex()</div><div class="ttdoc">Internal: returns the index in the literal in the underlying CpModelProto.</div><div class="ttdef"><b>Definition:</b> <a href="NotBooleanVariable_8java_source.html#l00027">NotBooleanVariable.java:27</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable_html_ae49d3ac91a2d4c5757cea041794e9505"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#ae49d3ac91a2d4c5757cea041794e9505">com.google.ortools.sat.NotBooleanVariable.not</a></div><div class="ttdeci">Literal not()</div><div class="ttdoc">Returns the negation of this literal.</div><div class="ttdef"><b>Definition:</b> <a href="NotBooleanVariable_8java_source.html#l00033">NotBooleanVariable.java:33</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html_aa9301cf7d1fa5f0994bb64186bd056c4"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html#aa9301cf7d1fa5f0994bb64186bd056c4">com.google.ortools.sat.IntVar.getShortString</a></div><div class="ttdeci">String getShortString()</div><div class="ttdoc">Returns a short string describing the variable.</div><div class="ttdef"><b>Definition:</b> <a href="com_2google_2ortools_2sat_2IntVar_8java_source.html#l00074">com/google/ortools/sat/IntVar.java:74</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable_html_aa97c6666b77683360cf63c94600d583b"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1NotBooleanVariable.html#aa97c6666b77683360cf63c94600d583b">com.google.ortools.sat.NotBooleanVariable.getShortString</a></div><div class="ttdeci">String getShortString()</div><div class="ttdoc">Returns a short string describing this literal.</div><div class="ttdef"><b>Definition:</b> <a href="NotBooleanVariable_8java_source.html#l00039">NotBooleanVariable.java:39</a></div></div>
|
|
<div class="ttc" id="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar_html"><div class="ttname"><a href="classcom_1_1google_1_1ortools_1_1sat_1_1IntVar.html">com.google.ortools.sat.IntVar</a></div><div class="ttdoc">An integer variable.</div><div class="ttdef"><b>Definition:</b> <a href="com_2google_2ortools_2sat_2IntVar_8java_source.html#l00021">com/google/ortools/sat/IntVar.java:21</a></div></div>
|
|
<div class="ttc" id="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal_html"><div class="ttname"><a href="interfacecom_1_1google_1_1ortools_1_1sat_1_1Literal.html">com.google.ortools.sat.Literal</a></div><div class="ttdoc">Interface to describe a boolean variable or its negation.</div><div class="ttdef"><b>Definition:</b> <a href="Literal_8java_source.html#l00017">Literal.java:17</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|