Files
ortools-clone/docs/cpp/sat__base_8h_source.html
Mizux Seiha 17edcf0e25 Update doc
2021-09-30 01:28:18 +02:00

829 lines
190 KiB
HTML

<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: sat_base.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="orLogo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OR-Tools
&#160;<span id="projectnumber">9.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('sat__base_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle"><div class="title">sat_base.h</div></div>
</div><!--header-->
<div class="contents">
<a href="sat__base_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright 2010-2021 Google LLC</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a id="l00003" 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 id="l00004" 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 id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">//</span></div>
<div class="line"><a id="l00006" 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 id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">//</span></div>
<div class="line"><a id="l00008" 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 id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a id="l00010" 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 id="l00011" 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 id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// limitations under the License.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// Basic types and classes used by the sat solver.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#ifndef OR_TOOLS_SAT_SAT_BASE_H_</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#define OR_TOOLS_SAT_SAT_BASE_H_</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#include &quot;absl/strings/str_format.h&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#include &quot;absl/types/span.h&quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#include &quot;<a class="code" href="int__type_8h.html">ortools/base/int_type.h</a>&quot;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#include &quot;<a class="code" href="integral__types_8h.html">ortools/base/integral_types.h</a>&quot;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#include &quot;<a class="code" href="base_2logging_8h.html">ortools/base/logging.h</a>&quot;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &quot;<a class="code" href="macros_8h.html">ortools/base/macros.h</a>&quot;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &quot;<a class="code" href="strong__vector_8h.html">ortools/base/strong_vector.h</a>&quot;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &quot;<a class="code" href="sat_2model_8h.html">ortools/sat/model.h</a>&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &quot;<a class="code" href="bitset_8h.html">ortools/util/bitset.h</a>&quot;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">namespace </span>sat {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">// Index of a variable (&gt;= 0).</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a766cf75290846b2cd9685754d6e26ee7"> 40</a></span><a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a84a0f65f1ec460c487789fe6a7620f77">DEFINE_INT_TYPE</a>(BooleanVariable, <span class="keywordtype">int</span>);</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#add67896a84f6372a648154c5770a0ae0"> 41</a></span><span class="keyword">const</span> BooleanVariable <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#add67896a84f6372a648154c5770a0ae0">kNoBooleanVariable</a>(-1);</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">// Index of a literal (&gt;= 0), see Literal below.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a7126a60afcb1f3fa5f6a726623728355"> 44</a></span><a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a84a0f65f1ec460c487789fe6a7620f77">DEFINE_INT_TYPE</a>(LiteralIndex, <span class="keywordtype">int</span>);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a2dbcb7017d468a17bdb30252af5c6c31"> 45</a></span><span class="keyword">const</span> LiteralIndex <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a2dbcb7017d468a17bdb30252af5c6c31">kNoLiteralIndex</a>(-1);</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">// Special values used in some API to indicate a literal that is always true</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">// or always false.</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a7ab45c5256e605ee3da3bf3abd1df2e1"> 49</a></span><span class="keyword">const</span> LiteralIndex <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a7ab45c5256e605ee3da3bf3abd1df2e1">kTrueLiteralIndex</a>(-2);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a969b5056550d96847f8c35f19fd17f50"> 50</a></span><span class="keyword">const</span> LiteralIndex <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a969b5056550d96847f8c35f19fd17f50">kFalseLiteralIndex</a>(-3);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">// A literal is used to represent a variable or its negation. If it represents</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">// the variable it is said to be positive. If it represent its negation, it is</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">// said to be negative. We support two representations as an integer.</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment">//</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment">// The &quot;signed&quot; encoding of a literal is convenient for input/output and is used</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">// in the cnf file format. For a 0-based variable index x, (x + 1) represent the</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">// variable x and -(x + 1) represent its negation. The signed value 0 is an</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">// undefined literal and this class can never contain it.</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment">//</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment">// The &quot;index&quot; encoding of a literal is convenient as an index to an array</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment">// and is the one used internally for efficiency. It is always positive or zero,</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment">// and for a 0-based variable index x, (x &lt;&lt; 1) encode the variable x and the</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment">// same number XOR 1 encode its negation.</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html"> 65</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Not explicit for tests so we can write:</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// vector&lt;literal&gt; literal = {+1, -3, +4, -9};</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a03f5ae0ce9819070959d97a8ba3fafeb"> 69</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a03f5ae0ce9819070959d97a8ba3fafeb">Literal</a>(<span class="keywordtype">int</span> signed_value) <span class="comment">// NOLINT</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> : index_(signed_value &gt; 0 ? ((signed_value - 1) &lt;&lt; 1)</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> : ((-signed_value - 1) &lt;&lt; 1) ^ 1) {</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_define" href="base_2logging_8h.html#ab25e01a2942b821d66371fc68d53f2eb">CHECK_NE</a>(signed_value, 0);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a9784d5d367dedd98ed04e2fa348f074f"> 75</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a9784d5d367dedd98ed04e2fa348f074f">Literal</a>() {}</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a5ae65a7505484ceddf89bd2b9c21d792"> 76</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a5ae65a7505484ceddf89bd2b9c21d792">Literal</a>(LiteralIndex <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>) : index_(<a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>.<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>()) {}</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a61f955aa65f0a4fbac978a971df2a71b"> 77</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a61f955aa65f0a4fbac978a971df2a71b">Literal</a>(BooleanVariable variable, <span class="keywordtype">bool</span> is_positive)</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> : index_(is_positive ? (variable.<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>() &lt;&lt; 1)</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> : (variable.<a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>() &lt;&lt; 1) ^ 1) {}</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8"> 81</a></span> BooleanVariable <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">Variable</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> BooleanVariable(index_ &gt;&gt; 1); }</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#ab76ca9049d6f3f1948d7120a98765107"> 82</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#ab76ca9049d6f3f1948d7120a98765107">IsPositive</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(index_ &amp; 1); }</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a25c0ee2396b7c753ede511a987c31450"> 83</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a25c0ee2396b7c753ede511a987c31450">IsNegative</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (index_ &amp; 1); }</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a4a11c7c4d7706c09de5e18707c3b5c62"> 85</a></span> LiteralIndex <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a4a11c7c4d7706c09de5e18707c3b5c62">Index</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> LiteralIndex(index_); }</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7"> 86</a></span> LiteralIndex <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7">NegatedIndex</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> LiteralIndex(index_ ^ 1); }</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a44fc3f1a79635fadb162d04cec312341"> 88</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a44fc3f1a79635fadb162d04cec312341">SignedValue</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> (index_ &amp; 1) ? -((index_ &gt;&gt; 1) + 1) : ((index_ &gt;&gt; 1) + 1);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a886e9c024f7209181c0a850b6e90c644"> 92</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a886e9c024f7209181c0a850b6e90c644">Negated</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a9784d5d367dedd98ed04e2fa348f074f">Literal</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7">NegatedIndex</a>()); }</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a764be64f3029f8b8e23511061d8de355"> 94</a></span> std::string <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a764be64f3029f8b8e23511061d8de355">DebugString</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> absl::StrFormat(<span class="stringliteral">&quot;%+d&quot;</span>, <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a44fc3f1a79635fadb162d04cec312341">SignedValue</a>());</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a78ae4d5b6b40e2cc193c4b6a86c24625"> 97</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a78ae4d5b6b40e2cc193c4b6a86c24625">operator==</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> index_ == other.index_; }</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#a7b1388435465b7a06a34aa47620ea00a"> 98</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a7b1388435465b7a06a34aa47620ea00a">operator!=</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> index_ != other.index_; }</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_literal.html#aa80bf44cbb4e63b3f6939627511ba172"> 100</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#aa80bf44cbb4e63b3f6939627511ba172">operator&lt;</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a>&amp; <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a4a11c7c4d7706c09de5e18707c3b5c62">Index</a>() &lt; <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Index();</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> }</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordtype">int</span> index_;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>};</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#aac642826c64ada206ceeec3c813a803a"> 108</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a15ca399ada8a279dc92f693ede7e4004">operator&lt;&lt;</a>(std::ostream&amp; os, <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> os &lt;&lt; <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a764be64f3029f8b8e23511061d8de355">DebugString</a>();</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">return</span> os;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>}</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1sat.html#a38ddf9ebf6ced32e8fef8475caa357c2"> 113</a></span><span class="keyword">inline</span> std::ostream&amp; <a class="code hl_function" href="namespaceoperations__research_1_1sat.html#a15ca399ada8a279dc92f693ede7e4004">operator&lt;&lt;</a>(std::ostream&amp; os,</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> absl::Span&lt;const Literal&gt; literals) {</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a> : literals) {</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> os &lt;&lt; <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a764be64f3029f8b8e23511061d8de355">DebugString</a>() &lt;&lt; <span class="stringliteral">&quot;,&quot;</span>;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">return</span> os;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span>}</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// Holds the current variable assignment of the solver.</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="comment">// Each variable can be unassigned or be assigned to true or false.</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html"> 123</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_variables_assignment.html">VariablesAssignment</a> {</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a3a2eb52fad77241c041915420051ed0d"> 125</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a3a2eb52fad77241c041915420051ed0d">VariablesAssignment</a>() {}</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#af02c5883cb4307050488aa58c6090750"> 126</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#af02c5883cb4307050488aa58c6090750">VariablesAssignment</a>(<span class="keywordtype">int</span> num_variables) { <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#af7fbbd00f0e631ce361b5ce6636b2017">Resize</a>(num_variables); }</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#af7fbbd00f0e631ce361b5ce6636b2017"> 127</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#af7fbbd00f0e631ce361b5ce6636b2017">Resize</a>(<span class="keywordtype">int</span> num_variables) {</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> assignment_.Resize(LiteralIndex(num_variables &lt;&lt; 1));</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="comment">// Makes the given literal true by assigning its underlying variable to either</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="comment">// true or false depending on the literal sign. This can only be called on an</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// unassigned variable.</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a945bb6c1e83f281fdde5778473a12b37"> 134</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a945bb6c1e83f281fdde5778473a12b37">AssignFromTrueLiteral</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>) {</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">VariableIsAssigned</a>(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Variable()));</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> assignment_.Set(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Index());</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="comment">// Unassign the variable corresponding to the given literal.</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="comment">// This can only be called on an assigned variable.</span></div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac0fcde8be88b802d340601a4a0441b28"> 141</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac0fcde8be88b802d340601a4a0441b28">UnassignLiteral</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>) {</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">VariableIsAssigned</a>(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Variable()));</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> assignment_.ClearTwoBits(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Index());</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> }</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// Literal getters. Note that both can be false, in which case the</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="comment">// corresponding variable is not assigned.</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#acfd1646011e643f58fd7dc66d9cc90a5"> 148</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#acfd1646011e643f58fd7dc66d9cc90a5">LiteralIsFalse</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">return</span> assignment_.IsSet(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.NegatedIndex());</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> }</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a5300129913f51dcb0b1c531e3248490e"> 151</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a5300129913f51dcb0b1c531e3248490e">LiteralIsTrue</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">return</span> assignment_.IsSet(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Index());</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a142694366986039454f53b38e8378815"> 154</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a142694366986039454f53b38e8378815">LiteralIsAssigned</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">return</span> assignment_.AreOneOfTwoBitsSet(<a class="code hl_variable" href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a>.Index());</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> }</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="comment">// Returns true iff the given variable is assigned.</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d"> 159</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">VariableIsAssigned</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">return</span> assignment_.AreOneOfTwoBitsSet(LiteralIndex(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>.value() &lt;&lt; 1));</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="comment">// Returns the literal of the given variable that is assigned to true.</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="comment">// That is, depending on the variable, it can be the positive literal or the</span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="comment">// negative one. Only call this on an assigned variable.</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac821b9b8b54da703731ce70864668a89"> 166</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac821b9b8b54da703731ce70864668a89">GetTrueLiteralForAssignedVariable</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">VariableIsAssigned</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, assignment_.IsSet(LiteralIndex(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>.value() &lt;&lt; 1)));</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> }</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ae19413c447377161d432f18d1323a037"> 171</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ae19413c447377161d432f18d1323a037">NumberOfVariables</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> assignment_.size().value() / 2; }</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="comment">// The encoding is as follows:</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="comment">// - assignment_.IsSet(literal.Index()) means literal is true.</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="comment">// - assignment_.IsSet(literal.Index() ^ 1]) means literal is false.</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="comment">// - If both are false, then the variable (and the literal) is unassigned.</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <a class="code hl_class" href="classoperations__research_1_1_bitset64.html">Bitset64&lt;LiteralIndex&gt;</a> assignment_;</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> DISALLOW_COPY_AND_ASSIGN(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_variables_assignment.html">VariablesAssignment</a>);</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span>};</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="comment">// Forward declaration.</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><span class="keyword">class </span>SatClause;</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="keyword">class </span>SatPropagator;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="comment">// Information about a variable assignment.</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_info.html"> 188</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1sat_1_1_assignment_info.html">AssignmentInfo</a> {</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="comment">// The decision level at which this assignment was made. This starts at 0 and</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="comment">// increases each time the solver takes a search decision.</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="comment">//</span></div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="comment">// TODO(user): We may be able to get rid of that for faster enqueues. Most of</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="comment">// the code only need to know if this is 0 or the highest level, and for the</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="comment">// LBD computation, the literal of the conflict are already ordered by level,</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="comment">// so we could do it fairly efficiently.</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> <span class="comment">//</span></div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="comment">// TODO(user): We currently don&#39;t support more than 2^28 decision levels. That</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> <span class="comment">// should be enough for most practical problem, but we should fail properly if</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="comment">// this limit is reached.</span></div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40"> 200</a></span> uint32_t <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a> : 28;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="comment">// The type of assignment (see AssignmentType below).</span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="comment">//</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="comment">// Note(user): We currently don&#39;t support more than 16 types of assignment.</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="comment">// This is checked in RegisterPropagator().</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03"> 206</a></span> <span class="keyword">mutable</span> uint32_t <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> : 4;</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="comment">// The index of this assignment in the trail.</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af"> 209</a></span> int32_t <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>;</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_info.html#a764be64f3029f8b8e23511061d8de355"> 211</a></span> std::string <a class="code hl_function" href="structoperations__research_1_1sat_1_1_assignment_info.html#a764be64f3029f8b8e23511061d8de355">DebugString</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="keywordflow">return</span> absl::StrFormat(<span class="stringliteral">&quot;level:%d type:%d trail_index:%d&quot;</span>, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a>, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a>,</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> }</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span>};</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span><span class="keyword">static_assert</span>(<span class="keyword">sizeof</span>(AssignmentInfo) == 8,</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="stringliteral">&quot;ERROR_AssignmentInfo_is_not_well_compacted&quot;</span>);</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span><span class="comment">// Each literal on the trail will have an associated propagation &quot;type&quot; which is</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span><span class="comment">// either one of these special types or the id of a propagator.</span></div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_type.html"> 221</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1sat_1_1_assignment_type.html">AssignmentType</a> {</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9"> 222</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">kCachedReason</a> = 0;</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_type.html#a0af1fd961132503823ccfd6df2adefad"> 223</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a0af1fd961132503823ccfd6df2adefad">kUnitReason</a> = 1;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_type.html#a916a0609367bae97bd6788542d4925eb"> 224</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a916a0609367bae97bd6788542d4925eb">kSearchDecision</a> = 2;</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347"> 225</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">kSameReasonAs</a> = 3;</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> </div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="comment">// Propagator ids starts from there and are created dynamically.</span></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"><a class="line" href="structoperations__research_1_1sat_1_1_assignment_type.html#a815024d87e5d1d440d156094da0a6ceb"> 228</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a815024d87e5d1d440d156094da0a6ceb">kFirstFreePropagationId</a> = 4;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span>};</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span><span class="comment">// The solver trail stores the assignment made by the solver in order.</span></div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span><span class="comment">// This class is responsible for maintaining the assignment of each variable</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span><span class="comment">// and the information of each assignment.</span></div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html"> 234</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a> {</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a3e73ede56a82d4d632ef52165913443d"> 236</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a3e73ede56a82d4d632ef52165913443d">Trail</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_model.html">Model</a>* <a class="code hl_variable" href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a>) : <a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>() {}</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#ade548858eb3eee55460833295e880e9b"> 238</a></span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ade548858eb3eee55460833295e880e9b">Trail</a>() {</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a> = 0;</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a> = 0;</div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> }</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> </div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#af7fbbd00f0e631ce361b5ce6636b2017">Resize</a>(<span class="keywordtype">int</span> num_variables);</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> </div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="comment">// Registers a propagator. This assigns a unique id to this propagator and</span></div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="comment">// calls SetPropagatorId() on it.</span></div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a120ef5f82f667fe8a6a38db137bfd2a7">RegisterPropagator</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_propagator.html">SatPropagator</a>* propagator);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> </div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="comment">// Enqueues the assignment that make the given literal true on the trail. This</span></div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="comment">// should only be called on unassigned variables.</span></div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92"> 251</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92">Enqueue</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> true_literal, <span class="keywordtype">int</span> propagator_id) {</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">VariableIsAssigned</a>(true_literal.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">Variable</a>()));</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> trail_[current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>] = true_literal;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = propagator_id;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> info_[true_literal.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">Variable</a>()] = current_info_;</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a945bb6c1e83f281fdde5778473a12b37">AssignFromTrueLiteral</a>(true_literal);</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> ++current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>;</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> }</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> </div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <span class="comment">// Specific Enqueue() version for the search decision.</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#afc2d489cf3ae30c4b27ff1e4359e1be9"> 261</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#afc2d489cf3ae30c4b27ff1e4359e1be9">EnqueueSearchDecision</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> true_literal) {</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92">Enqueue</a>(true_literal, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a916a0609367bae97bd6788542d4925eb">AssignmentType::kSearchDecision</a>);</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> }</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span> </div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> <span class="comment">// Specific Enqueue() version for a fixed variable.</span></div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#afb89e56bea39296ff292b51a84491875"> 266</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#afb89e56bea39296ff292b51a84491875">EnqueueWithUnitReason</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> true_literal) {</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92">Enqueue</a>(true_literal, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a0af1fd961132503823ccfd6df2adefad">AssignmentType::kUnitReason</a>);</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> }</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> </div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="comment">// Some constraints propagate a lot of literals at once. In these cases, it is</span></div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="comment">// more efficient to have all the propagated literals except the first one</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="comment">// referring to the reason of the first of them.</span></div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a4086a48ef9859b6ed0a5e9dd08d622c7"> 273</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a4086a48ef9859b6ed0a5e9dd08d622c7">EnqueueWithSameReasonAs</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> true_literal,</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> BooleanVariable reference_var) {</div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> reference_var_with_same_reason_as_[true_literal.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">Variable</a>()] = reference_var;</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92">Enqueue</a>(true_literal, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">AssignmentType::kSameReasonAs</a>);</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> }</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> </div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="comment">// Enqueues the given literal using the current content of</span></div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="comment">// GetEmptyVectorToStoreReason() as the reason. This API is a bit more</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <span class="comment">// leanient and does not require the literal to be unassigned. If it is</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="comment">// already assigned to false, then MutableConflict() will be set appropriately</span></div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="comment">// and this will return false otherwise this will enqueue the literal and</span></div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="comment">// returns true.</span></div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#aa390738a7cb0521a9c1951f3108c0251"> 285</a></span> ABSL_MUST_USE_RESULT <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#aa390738a7cb0521a9c1951f3108c0251">EnqueueWithStoredReason</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a> true_literal) {</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <span class="keywordflow">if</span> (assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#a5300129913f51dcb0b1c531e3248490e">LiteralIsTrue</a>(true_literal)) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <span class="keywordflow">if</span> (assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#acfd1646011e643f58fd7dc66d9cc90a5">LiteralIsFalse</a>(true_literal)) {</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> *<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ab932e215c6dff3fe8f077d4d6a409c0c">MutableConflict</a>() = reasons_repository_[<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>()];</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ab932e215c6dff3fe8f077d4d6a409c0c">MutableConflict</a>()-&gt;push_back(true_literal);</div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> }</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> </div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92">Enqueue</a>(true_literal, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">AssignmentType::kCachedReason</a>);</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> <span class="keyword">const</span> BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = true_literal.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">Variable</a>();</div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> reasons_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>] = reasons_repository_[info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].trail_index];</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> old_type_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>] = info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type;</div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type = <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">AssignmentType::kCachedReason</a>;</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> }</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="comment">// Returns the reason why this variable was assigned.</span></div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <span class="comment">//</span></div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> <span class="comment">// Note that this shouldn&#39;t be called on a variable at level zero, because we</span></div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="comment">// don&#39;t cleanup the reason data for these variables but the underlying</span></div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <span class="comment">// clauses may have been deleted.</span></div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> absl::Span&lt;const Literal&gt; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a885bcf9213525765f68daf84eed76c2e">Reason</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="comment">// Returns the &quot;type&quot; of an assignment (see AssignmentType). Note that this</span></div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> <span class="comment">// function never returns kSameReasonAs or kCachedReason, it instead returns</span></div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> <span class="comment">// the initial type that caused this assignment. As such, it is different</span></div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> <span class="comment">// from Info(var).type and the latter should not be used outside this class.</span></div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a5ed9d5f5c759afe4a008adaabd80c6f8">AssignmentType</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> <span class="comment">// If a variable was propagated with EnqueueWithSameReasonAs(), returns its</span></div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="comment">// reference variable. Otherwise return the given variable.</span></div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> BooleanVariable <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a89ab9ae41ab13f8847ac18e8beac37ed">ReferenceVarWithSameReason</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> </div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> <span class="comment">// This can be used to get a location at which the reason for the literal</span></div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> <span class="comment">// at trail_index on the trail can be stored. This clears the vector before</span></div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="comment">// returning it.</span></div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a39e628d11fd17d1fd771210f8c8b1d2d"> 321</a></span> std::vector&lt;Literal&gt;* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a39e628d11fd17d1fd771210f8c8b1d2d">GetEmptyVectorToStoreReason</a>(<span class="keywordtype">int</span> trail_index)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keywordflow">if</span> (trail_index &gt;= reasons_repository_.size()) {</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> reasons_repository_.resize(trail_index + 1);</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> }</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> reasons_repository_[trail_index].clear();</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="keywordflow">return</span> &amp;reasons_repository_[trail_index];</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> }</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> <span class="comment">// Shortcut for GetEmptyVectorToStoreReason(Index()).</span></div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#ae0129027c3d409e87a89c4d56a486c8a"> 330</a></span> std::vector&lt;Literal&gt;* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ae0129027c3d409e87a89c4d56a486c8a">GetEmptyVectorToStoreReason</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ae0129027c3d409e87a89c4d56a486c8a">GetEmptyVectorToStoreReason</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>());</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> }</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> </div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <span class="comment">// Explicitly overwrite the reason so that the given propagator will be</span></div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <span class="comment">// asked for it. This is currently only used by the BinaryImplicationGraph.</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a28bc96741547301bfc21fd9648b9ee13"> 336</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a28bc96741547301bfc21fd9648b9ee13">ChangeReason</a>(<span class="keywordtype">int</span> trail_index, <span class="keywordtype">int</span> propagator_id) {</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="keyword">const</span> BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = trail_[trail_index].Variable();</div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type = propagator_id;</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> old_type_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>] = propagator_id;</div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> }</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> </div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="comment">// Reverts the trail and underlying assignment to the given target trail</span></div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <span class="comment">// index. Note that we do not touch the assignment info.</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#aa62b9215667a0b7dc6af8251dbaba486"> 344</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#aa62b9215667a0b7dc6af8251dbaba486">Untrail</a>(<span class="keywordtype">int</span> target_trail_index) {</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a> = <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>();</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> num_untrailed_enqueues_ += <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a> - target_trail_index;</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = target_trail_index; i &lt; <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>; ++i) {</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac0fcde8be88b802d340601a4a0441b28">UnassignLiteral</a>(trail_[i]);</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> }</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a> = target_trail_index;</div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> }</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a717924cd0aecc1908058a6ed7ffd31f3"> 352</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a717924cd0aecc1908058a6ed7ffd31f3">Dequeue</a>() { <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#aa62b9215667a0b7dc6af8251dbaba486">Untrail</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>() - 1); }</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> </div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> <span class="comment">// Changes the decision level used by the next Enqueue().</span></div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#adeeeb993a93b815c1c343f9c46ec3564"> 355</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#adeeeb993a93b815c1c343f9c46ec3564">SetDecisionLevel</a>(<span class="keywordtype">int</span> level) { current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a> = level; }</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#ad63c4461a1384629cb99413c6df8b9ca"> 356</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ad63c4461a1384629cb99413c6df8b9ca">CurrentDecisionLevel</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a>; }</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> </div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <span class="comment">// Generic interface to set the current failing clause.</span></div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <span class="comment">//</span></div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> <span class="comment">// Returns the address of a vector where a client can store the current</span></div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> <span class="comment">// conflict. This vector will be returned by the FailingClause() call.</span></div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#ab932e215c6dff3fe8f077d4d6a409c0c"> 362</a></span> std::vector&lt;Literal&gt;* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ab932e215c6dff3fe8f077d4d6a409c0c">MutableConflict</a>() {</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> failing_sat_clause_ = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> <span class="keywordflow">return</span> &amp;conflict_;</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> }</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> </div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> <span class="comment">// Returns the last conflict.</span></div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#ace3ed18a3fa848ebbe2a2166e273e903"> 368</a></span> absl::Span&lt;const Literal&gt; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ace3ed18a3fa848ebbe2a2166e273e903">FailingClause</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> conflict_; }</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> </div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="comment">// Specific SatClause interface so we can update the conflict clause activity.</span></div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <span class="comment">// Note that MutableConflict() automatically sets this to nullptr, so we can</span></div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> <span class="comment">// know whether or not the last conflict was caused by a clause.</span></div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a8490d4cfbcd8c3704ca87d30df1a35a2"> 373</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8490d4cfbcd8c3704ca87d30df1a35a2">SetFailingSatClause</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_clause.html">SatClause</a>* clause) { failing_sat_clause_ = clause; }</div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a1b8fbc7c3c520e649cbfea284f58c9f7"> 374</a></span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_clause.html">SatClause</a>* <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a1b8fbc7c3c520e649cbfea284f58c9f7">FailingSatClause</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> failing_sat_clause_; }</div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> </div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> <span class="comment">// Getters.</span></div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a9d3beb2afe4ae647674b054bf29290e2"> 377</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a9d3beb2afe4ae647674b054bf29290e2">NumVariables</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> trail_.size(); }</div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a38e7aa21c6a38b5019bb0413d4be489b"> 378</a></span> int64_t <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a38e7aa21c6a38b5019bb0413d4be489b">NumberOfEnqueues</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> num_untrailed_enqueues_ + <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>(); }</div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179"> 379</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>; }</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#ae5118ffa8ab3bda312c0a48bc7a2f1c3"> 380</a></span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_literal.html">Literal</a>&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ae5118ffa8ab3bda312c0a48bc7a2f1c3">operator[]</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> trail_[<a class="code hl_variable" href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>]; }</div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a4793952607a98dfddfbcc17abfabbb4b"> 381</a></span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_variables_assignment.html">VariablesAssignment</a>&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a4793952607a98dfddfbcc17abfabbb4b">Assignment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> assignment_; }</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#aba78b12088909fb59dbdd0cb064412ae"> 382</a></span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_assignment_info.html">AssignmentInfo</a>&amp; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#aba78b12088909fb59dbdd0cb064412ae">Info</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <a class="code hl_define" href="base_2logging_8h.html#aae2dc65d9ea248d54bf39daa986dd295">DCHECK_GE</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, 0);</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> <a class="code hl_define" href="base_2logging_8h.html#ab62f5ed8f2d48e29802be0cbbcd1359a">DCHECK_LT</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>, info_.size());</div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> <span class="keywordflow">return</span> info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> }</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> </div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> <span class="comment">// Print the current literals on the trail.</span></div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a6097c48821f010becb9a6910f4c39288"> 389</a></span> std::string <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a6097c48821f010becb9a6910f4c39288">DebugString</a>() {</div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> std::string result;</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; current_info_.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>; ++i) {</div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <span class="keywordflow">if</span> (!result.empty()) result += <span class="stringliteral">&quot; &quot;</span>;</div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> result += trail_[i].DebugString();</div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> }</div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> }</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> </div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> int64_t num_untrailed_enqueues_ = 0;</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_assignment_info.html">AssignmentInfo</a> current_info_;</div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_variables_assignment.html">VariablesAssignment</a> assignment_;</div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> std::vector&lt;Literal&gt; trail_;</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> std::vector&lt;Literal&gt; conflict_;</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <a class="code hl_class" href="classabsl_1_1_strong_vector.html">absl::StrongVector&lt;BooleanVariable, AssignmentInfo&gt;</a> info_;</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_clause.html">SatClause</a>* failing_sat_clause_;</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> </div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> <span class="comment">// Data used by EnqueueWithSameReasonAs().</span></div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <a class="code hl_class" href="classabsl_1_1_strong_vector.html">absl::StrongVector&lt;BooleanVariable, BooleanVariable&gt;</a></div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> reference_var_with_same_reason_as_;</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> </div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <span class="comment">// Reason cache. Mutable since we want the API to be the same whether the</span></div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> <span class="comment">// reason are cached or not.</span></div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <span class="comment">//</span></div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> <span class="comment">// When a reason is computed for the first time, we change the type of the</span></div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> <span class="comment">// variable assignment to kCachedReason so that we know that if it is needed</span></div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> <span class="comment">// again the reason can just be retrieved by a direct access to reasons_. The</span></div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> <span class="comment">// old type is saved in old_type_ and can be retrieved by</span></div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> <span class="comment">// AssignmentType().</span></div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> <span class="comment">//</span></div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> <span class="comment">// Note(user): Changing the type is not &quot;clean&quot; but it is efficient. The idea</span></div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> <span class="comment">// is that it is important to do as little as possible when pushing/popping</span></div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <span class="comment">// literals on the trail. Computing the reason happens a lot less often, so it</span></div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> <span class="comment">// is okay to do slightly more work then. Note also, that we don&#39;t need to</span></div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> <span class="comment">// do anything on &quot;untrail&quot;, the kCachedReason type will be overwritten when</span></div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> <span class="comment">// the same variable is assigned again.</span></div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> <span class="comment">//</span></div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> <span class="comment">// TODO(user): An alternative would be to change the sign of the type. This</span></div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> <span class="comment">// would remove the need for a separate old_type_ vector, but it requires</span></div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> <span class="comment">// more bits for the type filed in AssignmentInfo.</span></div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> <span class="comment">//</span></div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <span class="comment">// Note that we use a deque for the reason repository so that if we add</span></div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> <span class="comment">// variables, the memory address of the vectors (kept in reasons_) are still</span></div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> <span class="comment">// valid.</span></div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> <span class="keyword">mutable</span> std::deque&lt;std::vector&lt;Literal&gt;&gt; reasons_repository_;</div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> <span class="keyword">mutable</span> <a class="code hl_class" href="classabsl_1_1_strong_vector.html">absl::StrongVector&lt;BooleanVariable, absl::Span&lt;const Literal&gt;</a>&gt;</div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> reasons_;</div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> <span class="keyword">mutable</span> <a class="code hl_class" href="classabsl_1_1_strong_vector.html">absl::StrongVector&lt;BooleanVariable, int&gt;</a> old_type_;</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> </div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> <span class="comment">// This is used by RegisterPropagator() and Reason().</span></div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> std::vector&lt;SatPropagator*&gt; propagators_;</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> </div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> DISALLOW_COPY_AND_ASSIGN(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>);</div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span>};</div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> </div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span><span class="comment">// Base class for all the SAT constraints.</span></div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html"> 446</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_propagator.html">SatPropagator</a> {</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a20c7bd4db4f16e6b2aab97a895df1084"> 448</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a20c7bd4db4f16e6b2aab97a895df1084">SatPropagator</a>(<span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>)</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> : <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a723d30392e2c4f36252de0528a1b246d">name_</a>(<a class="code hl_variable" href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a>), <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a0af2aa6e387b8037179350b735fe127e">propagator_id_</a>(-1), <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a>(0) {}</div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#aa1dd9e9ddcc90d98d8a318a581b4e443"> 450</a></span> <span class="keyword">virtual</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#aa1dd9e9ddcc90d98d8a318a581b4e443">~SatPropagator</a>() {}</div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> </div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> <span class="comment">// Sets/Gets this propagator unique id.</span></div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a12bf9bd5308cf2b5d67e3a7e6688aa5a"> 453</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a12bf9bd5308cf2b5d67e3a7e6688aa5a">SetPropagatorId</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>) { <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a0af2aa6e387b8037179350b735fe127e">propagator_id_</a> = id; }</div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a5298758773353d79435345e19a7b3a38"> 454</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a5298758773353d79435345e19a7b3a38">PropagatorId</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a0af2aa6e387b8037179350b735fe127e">propagator_id_</a>; }</div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> </div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> <span class="comment">// Inspects the trail from propagation_trail_index_ until at least one literal</span></div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> <span class="comment">// is propagated. Returns false iff a conflict is detected (in which case</span></div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> <span class="comment">// trail-&gt;SetFailingClause() must be called).</span></div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> <span class="comment">//</span></div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <span class="comment">// This must update propagation_trail_index_ so that all the literals before</span></div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> <span class="comment">// it have been propagated. In particular, if nothing was propagated, then</span></div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> <span class="comment">// PropagationIsDone() must return true.</span></div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a1973900fa40bcf4f3d07a5230b6eb854"> 463</a></span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a1973900fa40bcf4f3d07a5230b6eb854">Propagate</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>* trail) = 0;</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> </div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> <span class="comment">// Reverts the state so that all the literals with a trail index greater or</span></div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> <span class="comment">// equal to the given one are not processed for propagation. Note that the</span></div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> <span class="comment">// trail current decision level is already reverted before this is called.</span></div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> <span class="comment">//</span></div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span> <span class="comment">// TODO(user): Currently this is called at each Backtrack(), but we could</span></div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> <span class="comment">// bundle the calls in case multiple conflict one after the other are detected</span></div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> <span class="comment">// even before the Propagate() call of a SatPropagator is called.</span></div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> <span class="comment">//</span></div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span> <span class="comment">// TODO(user): It is not yet 100% the case, but this can be guaranteed to be</span></div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span> <span class="comment">// called with a trail index that will always be the start of a new decision</span></div>
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> <span class="comment">// level.</span></div>
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#acad857d56dc202cc4801dca57ca8414f"> 476</a></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#acad857d56dc202cc4801dca57ca8414f">Untrail</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&amp; trail, <span class="keywordtype">int</span> trail_index) {</div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a> = <a class="code hl_variable" href="alldiff__cst_8cc.html#ad10edae0a852d72fb76afb1c77735045">std::min</a>(<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a>, trail_index);</div>
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> }</div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> </div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> <span class="comment">// Explains why the literal at given trail_index was propagated by returning a</span></div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> <span class="comment">// reason for this propagation. This will only be called for literals that are</span></div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> <span class="comment">// on the trail and were propagated by this class.</span></div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> <span class="comment">//</span></div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> <span class="comment">// The interpretation is that because all the literals of a reason were</span></div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="comment">// assigned to false, we could deduce the assignement of the given variable.</span></div>
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <span class="comment">//</span></div>
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> <span class="comment">// The returned Span has to be valid until the literal is untrailed. A client</span></div>
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <span class="comment">// can use trail_.GetEmptyVectorToStoreReason() if it doesn&#39;t have a memory</span></div>
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> <span class="comment">// location that already contains the reason.</span></div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#ae7f5475de062cd6bb8f681f132135788"> 490</a></span> <span class="keyword">virtual</span> absl::Span&lt;const Literal&gt; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#ae7f5475de062cd6bb8f681f132135788">Reason</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&amp; trail,</div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> <span class="keywordtype">int</span> trail_index)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#acdd38e3c9f22f127d7776920e3079eda">FATAL</a>) &lt;&lt; <span class="stringliteral">&quot;Not implemented.&quot;</span>;</div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> <span class="keywordflow">return</span> {};</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> }</div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> </div>
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="comment">// Returns true if all the preconditions for Propagate() are satisfied.</span></div>
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <span class="comment">// This is just meant to be used in a DCHECK.</span></div>
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a4ae51aa8ed977c84ca2ab605dcf809d4">PropagatePreconditionsAreSatisfied</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&amp; trail) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> </div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> <span class="comment">// Returns true iff all the trail was inspected by this propagator.</span></div>
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#af02128adebd91298a21c579e2128bb32"> 501</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#af02128adebd91298a21c579e2128bb32">PropagationIsDone</a>(<span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&amp; trail)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a> == trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>();</div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> }</div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> </div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a723d30392e2c4f36252de0528a1b246d"> 506</a></span> <span class="keyword">const</span> std::string <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a723d30392e2c4f36252de0528a1b246d">name_</a>;</div>
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a0af2aa6e387b8037179350b735fe127e"> 507</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a0af2aa6e387b8037179350b735fe127e">propagator_id_</a>;</div>
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7"> 508</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a>;</div>
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> </div>
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> DISALLOW_COPY_AND_ASSIGN(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_propagator.html">SatPropagator</a>);</div>
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span>};</div>
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> </div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span><span class="comment">// ######################## Implementations below ########################</span></div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> </div>
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span><span class="comment">// TODO(user): A few of these method should be moved in a .cc</span></div>
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> </div>
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a4ae51aa8ed977c84ca2ab605dcf809d4"> 518</a></span><span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a4ae51aa8ed977c84ca2ab605dcf809d4">SatPropagator::PropagatePreconditionsAreSatisfied</a>(</div>
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> <span class="keyword">const</span> <a class="code hl_class" href="classoperations__research_1_1sat_1_1_trail.html">Trail</a>&amp; trail)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a> &gt; trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>()) {</div>
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a>) &lt;&lt; <span class="stringliteral">&quot;Issue in &#39;&quot;</span> &lt;&lt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a723d30392e2c4f36252de0528a1b246d">name_</a> &lt;&lt; <span class="stringliteral">&quot;:&quot;</span></div>
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> &lt;&lt; <span class="stringliteral">&quot; propagation_trail_index_=&quot;</span> &lt;&lt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a></div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> &lt;&lt; <span class="stringliteral">&quot; trail_.Index()=&quot;</span> &lt;&lt; trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>();</div>
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> }</div>
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a> &lt; trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>() &amp;&amp;</div>
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#aba78b12088909fb59dbdd0cb064412ae">Info</a>(trail[<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a>].Variable()).<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a> !=</div>
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ad63c4461a1384629cb99413c6df8b9ca">CurrentDecisionLevel</a>()) {</div>
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> <a class="code hl_define" href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a>(<a class="code hl_variable" href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a>) &lt;&lt; <span class="stringliteral">&quot;Issue in &#39;&quot;</span> &lt;&lt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a723d30392e2c4f36252de0528a1b246d">name_</a> &lt;&lt; <span class="stringliteral">&quot;&#39;:&quot;</span></div>
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> &lt;&lt; <span class="stringliteral">&quot; propagation_trail_index_=&quot;</span> &lt;&lt; <a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a></div>
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> &lt;&lt; <span class="stringliteral">&quot; trail_.Index()=&quot;</span> &lt;&lt; trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">Index</a>()</div>
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> &lt;&lt; <span class="stringliteral">&quot; level_at_propagation_index=&quot;</span></div>
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> &lt;&lt; trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#aba78b12088909fb59dbdd0cb064412ae">Info</a>(trail[<a class="code hl_variable" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">propagation_trail_index_</a>].Variable()).<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">level</a></div>
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> &lt;&lt; <span class="stringliteral">&quot; current_decision_level=&quot;</span> &lt;&lt; trail.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#ad63c4461a1384629cb99413c6df8b9ca">CurrentDecisionLevel</a>();</div>
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> }</div>
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span>}</div>
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> </div>
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#af7fbbd00f0e631ce361b5ce6636b2017"> 540</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#af7fbbd00f0e631ce361b5ce6636b2017">Trail::Resize</a>(<span class="keywordtype">int</span> num_variables) {</div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> assignment_.<a class="code hl_function" href="classoperations__research_1_1sat_1_1_variables_assignment.html#af7fbbd00f0e631ce361b5ce6636b2017">Resize</a>(num_variables);</div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> info_.resize(num_variables);</div>
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> trail_.resize(num_variables);</div>
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> reasons_.resize(num_variables);</div>
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> </div>
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> <span class="comment">// TODO(user): these vectors are not always used. Initialize them</span></div>
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> <span class="comment">// dynamically.</span></div>
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> old_type_.resize(num_variables);</div>
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> reference_var_with_same_reason_as_.resize(num_variables);</div>
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span>}</div>
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> </div>
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a120ef5f82f667fe8a6a38db137bfd2a7"> 552</a></span><span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a120ef5f82f667fe8a6a38db137bfd2a7">Trail::RegisterPropagator</a>(<a class="code hl_class" href="classoperations__research_1_1sat_1_1_sat_propagator.html">SatPropagator</a>* propagator) {</div>
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> <span class="keywordflow">if</span> (propagators_.empty()) {</div>
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> propagators_.resize(<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a815024d87e5d1d440d156094da0a6ceb">AssignmentType::kFirstFreePropagationId</a>);</div>
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> }</div>
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> <a class="code hl_define" href="base_2logging_8h.html#a4bd2e815ca2f702a4b6aa744b1ff3b82">CHECK_LT</a>(propagators_.size(), 16);</div>
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> propagator-&gt;<a class="code hl_function" href="classoperations__research_1_1sat_1_1_sat_propagator.html#a12bf9bd5308cf2b5d67e3a7e6688aa5a">SetPropagatorId</a>(propagators_.size());</div>
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> propagators_.push_back(propagator);</div>
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span>}</div>
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> </div>
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a89ab9ae41ab13f8847ac18e8beac37ed"> 561</a></span><span class="keyword">inline</span> BooleanVariable <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a89ab9ae41ab13f8847ac18e8beac37ed">Trail::ReferenceVarWithSameReason</a>(</div>
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a4793952607a98dfddfbcc17abfabbb4b">Assignment</a>().VariableIsAssigned(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> <span class="comment">// Note that we don&#39;t use AssignmentType() here.</span></div>
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> <span class="keywordflow">if</span> (info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type == <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">AssignmentType::kSameReasonAs</a>) {</div>
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = reference_var_with_same_reason_as_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a4793952607a98dfddfbcc17abfabbb4b">Assignment</a>().VariableIsAssigned(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>));</div>
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> <a class="code hl_define" href="base_2logging_8h.html#a46e69120fbd3b36e6960e096d23b66f0">DCHECK_NE</a>(info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">AssignmentType::kSameReasonAs</a>);</div>
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> }</div>
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>;</div>
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span>}</div>
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> </div>
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a5ed9d5f5c759afe4a008adaabd80c6f8"> 573</a></span><span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a5ed9d5f5c759afe4a008adaabd80c6f8">Trail::AssignmentType</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> <span class="keywordflow">if</span> (info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type == <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">AssignmentType::kSameReasonAs</a>) {</div>
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = reference_var_with_same_reason_as_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span> <a class="code hl_define" href="base_2logging_8h.html#a46e69120fbd3b36e6960e096d23b66f0">DCHECK_NE</a>(info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type, <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">AssignmentType::kSameReasonAs</a>);</div>
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> }</div>
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> <span class="keyword">const</span> <span class="keywordtype">int</span> type = info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type;</div>
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> <span class="keywordflow">return</span> type != <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">AssignmentType::kCachedReason</a> ? type : old_type_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span>}</div>
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> </div>
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"><a class="line" href="classoperations__research_1_1sat_1_1_trail.html#a885bcf9213525765f68daf84eed76c2e"> 582</a></span><span class="keyword">inline</span> absl::Span&lt;const Literal&gt; <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a885bcf9213525765f68daf84eed76c2e">Trail::Reason</a>(BooleanVariable <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> <span class="comment">// Special case for AssignmentType::kSameReasonAs to avoid a recursive call.</span></div>
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> <a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a> = <a class="code hl_function" href="classoperations__research_1_1sat_1_1_trail.html#a89ab9ae41ab13f8847ac18e8beac37ed">ReferenceVarWithSameReason</a>(<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>);</div>
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> </div>
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> <span class="comment">// Fast-track for cached reason.</span></div>
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> <span class="keywordflow">if</span> (info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type == <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">AssignmentType::kCachedReason</a>) <span class="keywordflow">return</span> reasons_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> </div>
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1sat_1_1_assignment_info.html">AssignmentInfo</a>&amp; info = info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> <span class="keywordflow">if</span> (info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> == <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a0af1fd961132503823ccfd6df2adefad">AssignmentType::kUnitReason</a> ||</div>
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a> == <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#a916a0609367bae97bd6788542d4925eb">AssignmentType::kSearchDecision</a>) {</div>
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> reasons_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>] = {};</div>
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> <a class="code hl_define" href="base_2logging_8h.html#ab62f5ed8f2d48e29802be0cbbcd1359a">DCHECK_LT</a>(info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a>, propagators_.size());</div>
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(propagators_[info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a>] != <span class="keyword">nullptr</span>) &lt;&lt; info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a>;</div>
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> reasons_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>] = propagators_[info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a>]-&gt;Reason(*<span class="keyword">this</span>, info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">trail_index</a>);</div>
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> }</div>
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> old_type_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>] = info.<a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">type</a>;</div>
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span> info_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>].type = <a class="code hl_variable" href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">AssignmentType::kCachedReason</a>;</div>
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"> 600</span> <span class="keywordflow">return</span> reasons_[<a class="code hl_variable" href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a>];</div>
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"> 601</span>}</div>
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"> 602</span> </div>
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"> 603</span>} <span class="comment">// namespace sat</span></div>
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"> 604</span>} <span class="comment">// namespace operations_research</span></div>
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span> </div>
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span><span class="preprocessor">#endif </span><span class="comment">// OR_TOOLS_SAT_SAT_BASE_H_</span></div>
<div class="ttc" id="aalldiff__cst_8cc_html_ad10edae0a852d72fb76afb1c77735045"><div class="ttname"><a href="alldiff__cst_8cc.html#ad10edae0a852d72fb76afb1c77735045">min</a></div><div class="ttdeci">int64_t min</div><div class="ttdef"><b>Definition:</b> <a href="alldiff__cst_8cc_source.html#l00139">alldiff_cst.cc:139</a></div></div>
<div class="ttc" id="abase_2logging_8h_html"><div class="ttname"><a href="base_2logging_8h.html">logging.h</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_a46e69120fbd3b36e6960e096d23b66f0"><div class="ttname"><a href="base_2logging_8h.html#a46e69120fbd3b36e6960e096d23b66f0">DCHECK_NE</a></div><div class="ttdeci">#define DCHECK_NE(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00887">base/logging.h:887</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_a4bd2e815ca2f702a4b6aa744b1ff3b82"><div class="ttname"><a href="base_2logging_8h.html#a4bd2e815ca2f702a4b6aa744b1ff3b82">CHECK_LT</a></div><div class="ttdeci">#define CHECK_LT(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00701">base/logging.h:701</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_aae2dc65d9ea248d54bf39daa986dd295"><div class="ttname"><a href="base_2logging_8h.html#aae2dc65d9ea248d54bf39daa986dd295">DCHECK_GE</a></div><div class="ttdeci">#define DCHECK_GE(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00890">base/logging.h:890</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_ab25e01a2942b821d66371fc68d53f2eb"><div class="ttname"><a href="base_2logging_8h.html#ab25e01a2942b821d66371fc68d53f2eb">CHECK_NE</a></div><div class="ttdeci">#define CHECK_NE(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00699">base/logging.h:699</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_ab62f5ed8f2d48e29802be0cbbcd1359a"><div class="ttname"><a href="base_2logging_8h.html#ab62f5ed8f2d48e29802be0cbbcd1359a">DCHECK_LT</a></div><div class="ttdeci">#define DCHECK_LT(val1, val2)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00889">base/logging.h:889</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_accad43a85d781d53381cd53a9894b6ae"><div class="ttname"><a href="base_2logging_8h.html#accad43a85d781d53381cd53a9894b6ae">LOG</a></div><div class="ttdeci">#define LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00416">base/logging.h:416</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_ae17f8119c108cf3070bad3449c7e0006"><div class="ttname"><a href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a></div><div class="ttdeci">#define DCHECK(condition)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00885">base/logging.h:885</a></div></div>
<div class="ttc" id="abitset_8h_html"><div class="ttname"><a href="bitset_8h.html">bitset.h</a></div></div>
<div class="ttc" id="aclassabsl_1_1_strong_vector_html"><div class="ttname"><a href="classabsl_1_1_strong_vector.html">absl::StrongVector</a></div><div class="ttdef"><b>Definition:</b> <a href="strong__vector_8h_source.html#l00076">strong_vector.h:76</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_bitset64_html"><div class="ttname"><a href="classoperations__research_1_1_bitset64.html">operations_research::Bitset64</a></div><div class="ttdef"><b>Definition:</b> <a href="bitset_8h_source.html#l00414">bitset.h:414</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html">operations_research::sat::Literal</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00065">sat_base.h:65</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a03f5ae0ce9819070959d97a8ba3fafeb"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a03f5ae0ce9819070959d97a8ba3fafeb">operations_research::sat::Literal::Literal</a></div><div class="ttdeci">Literal(int signed_value)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00069">sat_base.h:69</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a239e1315c4e975a35537790ba0d913a7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a239e1315c4e975a35537790ba0d913a7">operations_research::sat::Literal::NegatedIndex</a></div><div class="ttdeci">LiteralIndex NegatedIndex() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00086">sat_base.h:86</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a25c0ee2396b7c753ede511a987c31450"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a25c0ee2396b7c753ede511a987c31450">operations_research::sat::Literal::IsNegative</a></div><div class="ttdeci">bool IsNegative() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00083">sat_base.h:83</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a44fc3f1a79635fadb162d04cec312341"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a44fc3f1a79635fadb162d04cec312341">operations_research::sat::Literal::SignedValue</a></div><div class="ttdeci">int SignedValue() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00088">sat_base.h:88</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a4a11c7c4d7706c09de5e18707c3b5c62"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a4a11c7c4d7706c09de5e18707c3b5c62">operations_research::sat::Literal::Index</a></div><div class="ttdeci">LiteralIndex Index() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00085">sat_base.h:85</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a5ae65a7505484ceddf89bd2b9c21d792"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a5ae65a7505484ceddf89bd2b9c21d792">operations_research::sat::Literal::Literal</a></div><div class="ttdeci">Literal(LiteralIndex index)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00076">sat_base.h:76</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a61f955aa65f0a4fbac978a971df2a71b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a61f955aa65f0a4fbac978a971df2a71b">operations_research::sat::Literal::Literal</a></div><div class="ttdeci">Literal(BooleanVariable variable, bool is_positive)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00077">sat_base.h:77</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a6a5dcff82096cd7a7147bf996dbaa5a8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a6a5dcff82096cd7a7147bf996dbaa5a8">operations_research::sat::Literal::Variable</a></div><div class="ttdeci">BooleanVariable Variable() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00081">sat_base.h:81</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a764be64f3029f8b8e23511061d8de355"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a764be64f3029f8b8e23511061d8de355">operations_research::sat::Literal::DebugString</a></div><div class="ttdeci">std::string DebugString() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00094">sat_base.h:94</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a78ae4d5b6b40e2cc193c4b6a86c24625"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a78ae4d5b6b40e2cc193c4b6a86c24625">operations_research::sat::Literal::operator==</a></div><div class="ttdeci">bool operator==(Literal other) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00097">sat_base.h:97</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a7b1388435465b7a06a34aa47620ea00a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a7b1388435465b7a06a34aa47620ea00a">operations_research::sat::Literal::operator!=</a></div><div class="ttdeci">bool operator!=(Literal other) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00098">sat_base.h:98</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a886e9c024f7209181c0a850b6e90c644"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a886e9c024f7209181c0a850b6e90c644">operations_research::sat::Literal::Negated</a></div><div class="ttdeci">Literal Negated() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00092">sat_base.h:92</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_a9784d5d367dedd98ed04e2fa348f074f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#a9784d5d367dedd98ed04e2fa348f074f">operations_research::sat::Literal::Literal</a></div><div class="ttdeci">Literal()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00075">sat_base.h:75</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_aa80bf44cbb4e63b3f6939627511ba172"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#aa80bf44cbb4e63b3f6939627511ba172">operations_research::sat::Literal::operator&lt;</a></div><div class="ttdeci">bool operator&lt;(const Literal &amp;literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00100">sat_base.h:100</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_literal_html_ab76ca9049d6f3f1948d7120a98765107"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_literal.html#ab76ca9049d6f3f1948d7120a98765107">operations_research::sat::Literal::IsPositive</a></div><div class="ttdeci">bool IsPositive() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00082">sat_base.h:82</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_model_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_model.html">operations_research::sat::Model</a></div><div class="ttdoc">Class that owns everything related to a particular optimization model.</div><div class="ttdef"><b>Definition:</b> <a href="sat_2model_8h_source.html#l00038">sat/model.h:38</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_clause_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_clause.html">operations_research::sat::SatClause</a></div><div class="ttdef"><b>Definition:</b> <a href="clause_8h_source.html#l00052">clause.h:52</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html">operations_research::sat::SatPropagator</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00446">sat_base.h:446</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a06e2c6f3432a89d0160b831d48afd8b7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a06e2c6f3432a89d0160b831d48afd8b7">operations_research::sat::SatPropagator::propagation_trail_index_</a></div><div class="ttdeci">int propagation_trail_index_</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00508">sat_base.h:508</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a0af2aa6e387b8037179350b735fe127e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a0af2aa6e387b8037179350b735fe127e">operations_research::sat::SatPropagator::propagator_id_</a></div><div class="ttdeci">int propagator_id_</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00507">sat_base.h:507</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a12bf9bd5308cf2b5d67e3a7e6688aa5a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a12bf9bd5308cf2b5d67e3a7e6688aa5a">operations_research::sat::SatPropagator::SetPropagatorId</a></div><div class="ttdeci">void SetPropagatorId(int id)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00453">sat_base.h:453</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a1973900fa40bcf4f3d07a5230b6eb854"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a1973900fa40bcf4f3d07a5230b6eb854">operations_research::sat::SatPropagator::Propagate</a></div><div class="ttdeci">virtual bool Propagate(Trail *trail)=0</div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a20c7bd4db4f16e6b2aab97a895df1084"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a20c7bd4db4f16e6b2aab97a895df1084">operations_research::sat::SatPropagator::SatPropagator</a></div><div class="ttdeci">SatPropagator(const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00448">sat_base.h:448</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a4ae51aa8ed977c84ca2ab605dcf809d4"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a4ae51aa8ed977c84ca2ab605dcf809d4">operations_research::sat::SatPropagator::PropagatePreconditionsAreSatisfied</a></div><div class="ttdeci">bool PropagatePreconditionsAreSatisfied(const Trail &amp;trail) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00518">sat_base.h:518</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a5298758773353d79435345e19a7b3a38"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a5298758773353d79435345e19a7b3a38">operations_research::sat::SatPropagator::PropagatorId</a></div><div class="ttdeci">int PropagatorId() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00454">sat_base.h:454</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_a723d30392e2c4f36252de0528a1b246d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#a723d30392e2c4f36252de0528a1b246d">operations_research::sat::SatPropagator::name_</a></div><div class="ttdeci">const std::string name_</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00506">sat_base.h:506</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_aa1dd9e9ddcc90d98d8a318a581b4e443"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#aa1dd9e9ddcc90d98d8a318a581b4e443">operations_research::sat::SatPropagator::~SatPropagator</a></div><div class="ttdeci">virtual ~SatPropagator()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00450">sat_base.h:450</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_acad857d56dc202cc4801dca57ca8414f"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#acad857d56dc202cc4801dca57ca8414f">operations_research::sat::SatPropagator::Untrail</a></div><div class="ttdeci">virtual void Untrail(const Trail &amp;trail, int trail_index)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00476">sat_base.h:476</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_ae7f5475de062cd6bb8f681f132135788"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#ae7f5475de062cd6bb8f681f132135788">operations_research::sat::SatPropagator::Reason</a></div><div class="ttdeci">virtual absl::Span&lt; const Literal &gt; Reason(const Trail &amp;trail, int trail_index) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00490">sat_base.h:490</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_sat_propagator_html_af02128adebd91298a21c579e2128bb32"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_sat_propagator.html#af02128adebd91298a21c579e2128bb32">operations_research::sat::SatPropagator::PropagationIsDone</a></div><div class="ttdeci">bool PropagationIsDone(const Trail &amp;trail) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00501">sat_base.h:501</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html">operations_research::sat::Trail</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00234">sat_base.h:234</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a120ef5f82f667fe8a6a38db137bfd2a7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a120ef5f82f667fe8a6a38db137bfd2a7">operations_research::sat::Trail::RegisterPropagator</a></div><div class="ttdeci">void RegisterPropagator(SatPropagator *propagator)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00552">sat_base.h:552</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a12c36a7cb228d80bcad42fa38a103f92"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a12c36a7cb228d80bcad42fa38a103f92">operations_research::sat::Trail::Enqueue</a></div><div class="ttdeci">void Enqueue(Literal true_literal, int propagator_id)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00251">sat_base.h:251</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a1b8fbc7c3c520e649cbfea284f58c9f7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a1b8fbc7c3c520e649cbfea284f58c9f7">operations_research::sat::Trail::FailingSatClause</a></div><div class="ttdeci">SatClause * FailingSatClause() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00374">sat_base.h:374</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a28bc96741547301bfc21fd9648b9ee13"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a28bc96741547301bfc21fd9648b9ee13">operations_research::sat::Trail::ChangeReason</a></div><div class="ttdeci">void ChangeReason(int trail_index, int propagator_id)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00336">sat_base.h:336</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a38e7aa21c6a38b5019bb0413d4be489b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a38e7aa21c6a38b5019bb0413d4be489b">operations_research::sat::Trail::NumberOfEnqueues</a></div><div class="ttdeci">int64_t NumberOfEnqueues() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00378">sat_base.h:378</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a39e628d11fd17d1fd771210f8c8b1d2d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a39e628d11fd17d1fd771210f8c8b1d2d">operations_research::sat::Trail::GetEmptyVectorToStoreReason</a></div><div class="ttdeci">std::vector&lt; Literal &gt; * GetEmptyVectorToStoreReason(int trail_index) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00321">sat_base.h:321</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a3e73ede56a82d4d632ef52165913443d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a3e73ede56a82d4d632ef52165913443d">operations_research::sat::Trail::Trail</a></div><div class="ttdeci">Trail(Model *model)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00236">sat_base.h:236</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a4086a48ef9859b6ed0a5e9dd08d622c7"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a4086a48ef9859b6ed0a5e9dd08d622c7">operations_research::sat::Trail::EnqueueWithSameReasonAs</a></div><div class="ttdeci">void EnqueueWithSameReasonAs(Literal true_literal, BooleanVariable reference_var)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00273">sat_base.h:273</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a4793952607a98dfddfbcc17abfabbb4b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a4793952607a98dfddfbcc17abfabbb4b">operations_research::sat::Trail::Assignment</a></div><div class="ttdeci">const VariablesAssignment &amp; Assignment() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00381">sat_base.h:381</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a5ed9d5f5c759afe4a008adaabd80c6f8"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a5ed9d5f5c759afe4a008adaabd80c6f8">operations_research::sat::Trail::AssignmentType</a></div><div class="ttdeci">int AssignmentType(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00573">sat_base.h:573</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a6097c48821f010becb9a6910f4c39288"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a6097c48821f010becb9a6910f4c39288">operations_research::sat::Trail::DebugString</a></div><div class="ttdeci">std::string DebugString()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00389">sat_base.h:389</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a717924cd0aecc1908058a6ed7ffd31f3"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a717924cd0aecc1908058a6ed7ffd31f3">operations_research::sat::Trail::Dequeue</a></div><div class="ttdeci">void Dequeue()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00352">sat_base.h:352</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a8490d4cfbcd8c3704ca87d30df1a35a2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a8490d4cfbcd8c3704ca87d30df1a35a2">operations_research::sat::Trail::SetFailingSatClause</a></div><div class="ttdeci">void SetFailingSatClause(SatClause *clause)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00373">sat_base.h:373</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a885bcf9213525765f68daf84eed76c2e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a885bcf9213525765f68daf84eed76c2e">operations_research::sat::Trail::Reason</a></div><div class="ttdeci">absl::Span&lt; const Literal &gt; Reason(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00582">sat_base.h:582</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a89ab9ae41ab13f8847ac18e8beac37ed"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a89ab9ae41ab13f8847ac18e8beac37ed">operations_research::sat::Trail::ReferenceVarWithSameReason</a></div><div class="ttdeci">BooleanVariable ReferenceVarWithSameReason(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00561">sat_base.h:561</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a8ef12397d1682615bc3108c397734179"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a8ef12397d1682615bc3108c397734179">operations_research::sat::Trail::Index</a></div><div class="ttdeci">int Index() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00379">sat_base.h:379</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_a9d3beb2afe4ae647674b054bf29290e2"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#a9d3beb2afe4ae647674b054bf29290e2">operations_research::sat::Trail::NumVariables</a></div><div class="ttdeci">int NumVariables() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00377">sat_base.h:377</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_aa390738a7cb0521a9c1951f3108c0251"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#aa390738a7cb0521a9c1951f3108c0251">operations_research::sat::Trail::EnqueueWithStoredReason</a></div><div class="ttdeci">ABSL_MUST_USE_RESULT bool EnqueueWithStoredReason(Literal true_literal)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00285">sat_base.h:285</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_aa62b9215667a0b7dc6af8251dbaba486"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#aa62b9215667a0b7dc6af8251dbaba486">operations_research::sat::Trail::Untrail</a></div><div class="ttdeci">void Untrail(int target_trail_index)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00344">sat_base.h:344</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_ab932e215c6dff3fe8f077d4d6a409c0c"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#ab932e215c6dff3fe8f077d4d6a409c0c">operations_research::sat::Trail::MutableConflict</a></div><div class="ttdeci">std::vector&lt; Literal &gt; * MutableConflict()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00362">sat_base.h:362</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_aba78b12088909fb59dbdd0cb064412ae"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#aba78b12088909fb59dbdd0cb064412ae">operations_research::sat::Trail::Info</a></div><div class="ttdeci">const AssignmentInfo &amp; Info(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00382">sat_base.h:382</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_ace3ed18a3fa848ebbe2a2166e273e903"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#ace3ed18a3fa848ebbe2a2166e273e903">operations_research::sat::Trail::FailingClause</a></div><div class="ttdeci">absl::Span&lt; const Literal &gt; FailingClause() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00368">sat_base.h:368</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_ad63c4461a1384629cb99413c6df8b9ca"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#ad63c4461a1384629cb99413c6df8b9ca">operations_research::sat::Trail::CurrentDecisionLevel</a></div><div class="ttdeci">int CurrentDecisionLevel() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00356">sat_base.h:356</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_ade548858eb3eee55460833295e880e9b"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#ade548858eb3eee55460833295e880e9b">operations_research::sat::Trail::Trail</a></div><div class="ttdeci">Trail()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00238">sat_base.h:238</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_adeeeb993a93b815c1c343f9c46ec3564"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#adeeeb993a93b815c1c343f9c46ec3564">operations_research::sat::Trail::SetDecisionLevel</a></div><div class="ttdeci">void SetDecisionLevel(int level)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00355">sat_base.h:355</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_ae0129027c3d409e87a89c4d56a486c8a"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#ae0129027c3d409e87a89c4d56a486c8a">operations_research::sat::Trail::GetEmptyVectorToStoreReason</a></div><div class="ttdeci">std::vector&lt; Literal &gt; * GetEmptyVectorToStoreReason() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00330">sat_base.h:330</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_ae5118ffa8ab3bda312c0a48bc7a2f1c3"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#ae5118ffa8ab3bda312c0a48bc7a2f1c3">operations_research::sat::Trail::operator[]</a></div><div class="ttdeci">const Literal &amp; operator[](int index) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00380">sat_base.h:380</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_af7fbbd00f0e631ce361b5ce6636b2017"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#af7fbbd00f0e631ce361b5ce6636b2017">operations_research::sat::Trail::Resize</a></div><div class="ttdeci">void Resize(int num_variables)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00540">sat_base.h:540</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_afb89e56bea39296ff292b51a84491875"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#afb89e56bea39296ff292b51a84491875">operations_research::sat::Trail::EnqueueWithUnitReason</a></div><div class="ttdeci">void EnqueueWithUnitReason(Literal true_literal)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00266">sat_base.h:266</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_trail_html_afc2d489cf3ae30c4b27ff1e4359e1be9"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_trail.html#afc2d489cf3ae30c4b27ff1e4359e1be9">operations_research::sat::Trail::EnqueueSearchDecision</a></div><div class="ttdeci">void EnqueueSearchDecision(Literal true_literal)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00261">sat_base.h:261</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html">operations_research::sat::VariablesAssignment</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00123">sat_base.h:123</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a142694366986039454f53b38e8378815"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a142694366986039454f53b38e8378815">operations_research::sat::VariablesAssignment::LiteralIsAssigned</a></div><div class="ttdeci">bool LiteralIsAssigned(Literal literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00154">sat_base.h:154</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a3a2eb52fad77241c041915420051ed0d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a3a2eb52fad77241c041915420051ed0d">operations_research::sat::VariablesAssignment::VariablesAssignment</a></div><div class="ttdeci">VariablesAssignment()</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00125">sat_base.h:125</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a49e751eb6f0e9babd957889bb8e7472d"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a49e751eb6f0e9babd957889bb8e7472d">operations_research::sat::VariablesAssignment::VariableIsAssigned</a></div><div class="ttdeci">bool VariableIsAssigned(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00159">sat_base.h:159</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a5300129913f51dcb0b1c531e3248490e"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a5300129913f51dcb0b1c531e3248490e">operations_research::sat::VariablesAssignment::LiteralIsTrue</a></div><div class="ttdeci">bool LiteralIsTrue(Literal literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00151">sat_base.h:151</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_a945bb6c1e83f281fdde5778473a12b37"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#a945bb6c1e83f281fdde5778473a12b37">operations_research::sat::VariablesAssignment::AssignFromTrueLiteral</a></div><div class="ttdeci">void AssignFromTrueLiteral(Literal literal)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00134">sat_base.h:134</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_ac0fcde8be88b802d340601a4a0441b28"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac0fcde8be88b802d340601a4a0441b28">operations_research::sat::VariablesAssignment::UnassignLiteral</a></div><div class="ttdeci">void UnassignLiteral(Literal literal)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00141">sat_base.h:141</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_ac821b9b8b54da703731ce70864668a89"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#ac821b9b8b54da703731ce70864668a89">operations_research::sat::VariablesAssignment::GetTrueLiteralForAssignedVariable</a></div><div class="ttdeci">Literal GetTrueLiteralForAssignedVariable(BooleanVariable var) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00166">sat_base.h:166</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_acfd1646011e643f58fd7dc66d9cc90a5"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#acfd1646011e643f58fd7dc66d9cc90a5">operations_research::sat::VariablesAssignment::LiteralIsFalse</a></div><div class="ttdeci">bool LiteralIsFalse(Literal literal) const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00148">sat_base.h:148</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_ae19413c447377161d432f18d1323a037"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#ae19413c447377161d432f18d1323a037">operations_research::sat::VariablesAssignment::NumberOfVariables</a></div><div class="ttdeci">int NumberOfVariables() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00171">sat_base.h:171</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_af02c5883cb4307050488aa58c6090750"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#af02c5883cb4307050488aa58c6090750">operations_research::sat::VariablesAssignment::VariablesAssignment</a></div><div class="ttdeci">VariablesAssignment(int num_variables)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00126">sat_base.h:126</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1sat_1_1_variables_assignment_html_af7fbbd00f0e631ce361b5ce6636b2017"><div class="ttname"><a href="classoperations__research_1_1sat_1_1_variables_assignment.html#af7fbbd00f0e631ce361b5ce6636b2017">operations_research::sat::VariablesAssignment::Resize</a></div><div class="ttdeci">void Resize(int num_variables)</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00127">sat_base.h:127</a></div></div>
<div class="ttc" id="adefault__search_8cc_html_ac673bc430bdc3fdaa09f7becf98ef267"><div class="ttname"><a href="default__search_8cc.html#ac673bc430bdc3fdaa09f7becf98ef267">name</a></div><div class="ttdeci">const std::string name</div><div class="ttdef"><b>Definition:</b> <a href="default__search_8cc_source.html#l00813">default_search.cc:813</a></div></div>
<div class="ttc" id="ademon__profiler_8cc_html_ac072af30c4ffbc834bb4c681f6ecb514"><div class="ttname"><a href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a></div><div class="ttdeci">int64_t value</div><div class="ttdef"><b>Definition:</b> <a href="demon__profiler_8cc_source.html#l00044">demon_profiler.cc:44</a></div></div>
<div class="ttc" id="aexpr__array_8cc_html_a472a99923cbe11ae7b5a5d157d9ad465"><div class="ttname"><a href="expr__array_8cc.html#a472a99923cbe11ae7b5a5d157d9ad465">var</a></div><div class="ttdeci">IntVar * var</div><div class="ttdef"><b>Definition:</b> <a href="expr__array_8cc_source.html#l01874">expr_array.cc:1874</a></div></div>
<div class="ttc" id="agurobi__interface_8cc_html_a0728f23c9a47655d38e0bf1a2f200bcf"><div class="ttname"><a href="gurobi__interface_8cc.html#a0728f23c9a47655d38e0bf1a2f200bcf">model</a></div><div class="ttdeci">GRBmodel * model</div><div class="ttdef"><b>Definition:</b> <a href="gurobi__interface_8cc_source.html#l00273">gurobi_interface.cc:273</a></div></div>
<div class="ttc" id="aint__type_8h_html"><div class="ttname"><a href="int__type_8h.html">int_type.h</a></div></div>
<div class="ttc" id="aintegral__types_8h_html"><div class="ttname"><a href="integral__types_8h.html">integral_types.h</a></div></div>
<div class="ttc" id="alog__severity_8h_html_ab4a2cbab234914b320b7fae11b6e8cb9"><div class="ttname"><a href="log__severity_8h.html#ab4a2cbab234914b320b7fae11b6e8cb9">INFO</a></div><div class="ttdeci">const int INFO</div><div class="ttdef"><b>Definition:</b> <a href="log__severity_8h_source.html#l00031">log_severity.h:31</a></div></div>
<div class="ttc" id="alog__severity_8h_html_acdd38e3c9f22f127d7776920e3079eda"><div class="ttname"><a href="log__severity_8h.html#acdd38e3c9f22f127d7776920e3079eda">FATAL</a></div><div class="ttdeci">const int FATAL</div><div class="ttdef"><b>Definition:</b> <a href="log__severity_8h_source.html#l00032">log_severity.h:32</a></div></div>
<div class="ttc" id="amacros_8h_html"><div class="ttname"><a href="macros_8h.html">macros.h</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a15ca399ada8a279dc92f693ede7e4004"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a15ca399ada8a279dc92f693ede7e4004">operations_research::sat::operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, const BoolVar &amp;var)</div><div class="ttdef"><b>Definition:</b> <a href="cp__model_8cc_source.html#l00068">cp_model.cc:68</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a2dbcb7017d468a17bdb30252af5c6c31"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a2dbcb7017d468a17bdb30252af5c6c31">operations_research::sat::kNoLiteralIndex</a></div><div class="ttdeci">const LiteralIndex kNoLiteralIndex(-1)</div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a7ab45c5256e605ee3da3bf3abd1df2e1"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a7ab45c5256e605ee3da3bf3abd1df2e1">operations_research::sat::kTrueLiteralIndex</a></div><div class="ttdeci">const LiteralIndex kTrueLiteralIndex(-2)</div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a84a0f65f1ec460c487789fe6a7620f77"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a84a0f65f1ec460c487789fe6a7620f77">operations_research::sat::DEFINE_INT_TYPE</a></div><div class="ttdeci">DEFINE_INT_TYPE(ClauseIndex, int)</div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_a969b5056550d96847f8c35f19fd17f50"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#a969b5056550d96847f8c35f19fd17f50">operations_research::sat::kFalseLiteralIndex</a></div><div class="ttdeci">const LiteralIndex kFalseLiteralIndex(-3)</div></div>
<div class="ttc" id="anamespaceoperations__research_1_1sat_html_add67896a84f6372a648154c5770a0ae0"><div class="ttname"><a href="namespaceoperations__research_1_1sat.html#add67896a84f6372a648154c5770a0ae0">operations_research::sat::kNoBooleanVariable</a></div><div class="ttdeci">const BooleanVariable kNoBooleanVariable(-1)</div></div>
<div class="ttc" id="anamespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><div class="ttdef"><b>Definition:</b> <a href="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<div class="ttc" id="aoptimization_8cc_html_af63dcc00f2023fdf498e0829e6fb8a6b"><div class="ttname"><a href="optimization_8cc.html#af63dcc00f2023fdf498e0829e6fb8a6b">literal</a></div><div class="ttdeci">Literal literal</div><div class="ttdef"><b>Definition:</b> <a href="optimization_8cc_source.html#l00085">optimization.cc:85</a></div></div>
<div class="ttc" id="apack_8cc_html_a750b5d744c39a06bfb13e6eb010e35d0"><div class="ttname"><a href="pack_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a></div><div class="ttdeci">int index</div><div class="ttdef"><b>Definition:</b> <a href="pack_8cc_source.html#l00509">pack.cc:509</a></div></div>
<div class="ttc" id="asat_2model_8h_html"><div class="ttname"><a href="sat_2model_8h.html">model.h</a></div></div>
<div class="ttc" id="astrong__vector_8h_html"><div class="ttname"><a href="strong__vector_8h.html">strong_vector.h</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_info_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_info.html">operations_research::sat::AssignmentInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00188">sat_base.h:188</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_info_html_a0f2d611d5c2d56f60646827438acf3af"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_info.html#a0f2d611d5c2d56f60646827438acf3af">operations_research::sat::AssignmentInfo::trail_index</a></div><div class="ttdeci">int32_t trail_index</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00209">sat_base.h:209</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_info_html_a6a330c3b2adf87bfa27e9a9450d8bc40"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_info.html#a6a330c3b2adf87bfa27e9a9450d8bc40">operations_research::sat::AssignmentInfo::level</a></div><div class="ttdeci">uint32_t level</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00200">sat_base.h:200</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_info_html_a764be64f3029f8b8e23511061d8de355"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_info.html#a764be64f3029f8b8e23511061d8de355">operations_research::sat::AssignmentInfo::DebugString</a></div><div class="ttdeci">std::string DebugString() const</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00211">sat_base.h:211</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_info_html_ad44b615021ed3ccb734fcaf583ef4a03"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_info.html#ad44b615021ed3ccb734fcaf583ef4a03">operations_research::sat::AssignmentInfo::type</a></div><div class="ttdeci">uint32_t type</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00206">sat_base.h:206</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_type_html"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_type.html">operations_research::sat::AssignmentType</a></div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00221">sat_base.h:221</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_type_html_a0af1fd961132503823ccfd6df2adefad"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_type.html#a0af1fd961132503823ccfd6df2adefad">operations_research::sat::AssignmentType::kUnitReason</a></div><div class="ttdeci">static constexpr int kUnitReason</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00223">sat_base.h:223</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_type_html_a2d3b6b7de1d47e582380603377aaa347"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_type.html#a2d3b6b7de1d47e582380603377aaa347">operations_research::sat::AssignmentType::kSameReasonAs</a></div><div class="ttdeci">static constexpr int kSameReasonAs</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00225">sat_base.h:225</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_type_html_a815024d87e5d1d440d156094da0a6ceb"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_type.html#a815024d87e5d1d440d156094da0a6ceb">operations_research::sat::AssignmentType::kFirstFreePropagationId</a></div><div class="ttdeci">static constexpr int kFirstFreePropagationId</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00228">sat_base.h:228</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_type_html_a916a0609367bae97bd6788542d4925eb"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_type.html#a916a0609367bae97bd6788542d4925eb">operations_research::sat::AssignmentType::kSearchDecision</a></div><div class="ttdeci">static constexpr int kSearchDecision</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00224">sat_base.h:224</a></div></div>
<div class="ttc" id="astructoperations__research_1_1sat_1_1_assignment_type_html_aed9440f488a2d8ecd25c9c2dfe4b47a9"><div class="ttname"><a href="structoperations__research_1_1sat_1_1_assignment_type.html#aed9440f488a2d8ecd25c9c2dfe4b47a9">operations_research::sat::AssignmentType::kCachedReason</a></div><div class="ttdeci">static constexpr int kCachedReason</div><div class="ttdef"><b>Definition:</b> <a href="sat__base_8h_source.html#l00222">sat_base.h:222</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_a7cc1eeded8f693d0da6c729bc88c45a.html">ortools</a></li><li class="navelem"><a class="el" href="dir_dddac007a45022d9da6ea1dee012c3b9.html">sat</a></li><li class="navelem"><a class="el" href="sat__base_8h.html">sat_base.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.2 </li>
</ul>
</div>
</body>
</html>