Files
ortools-clone/docs/cpp/scattered__vector_8h_source.html
Mizux Seiha 3b81c981c2 Update doc
2022-03-04 00:19:15 +01:00

369 lines
81 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.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: scattered_vector.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.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<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('scattered__vector_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">scattered_vector.h</div></div>
</div><!--header-->
<div class="contents">
<a href="scattered__vector_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="preprocessor">#ifndef OR_TOOLS_LP_DATA_SCATTERED_VECTOR_H_</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#define OR_TOOLS_LP_DATA_SCATTERED_VECTOR_H_</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include &lt;limits&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include &quot;<a class="code" href="basictypes_8h.html">ortools/base/basictypes.h</a>&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</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="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include &quot;<a class="code" href="lp__types_8h.html">ortools/lp_data/lp_types.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</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="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace </span>glop {</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// A class representing an entry of a scattered vector. The i-th nonzero</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">// element of the vector is assumed to be located at indices[i] and its value is</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="comment">// coefficients[indices[i]], i.e., coefficients is a dense array.</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> IndexType&gt;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html"> 32</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html">ScatteredVectorEntry</a> {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a7147061a6e31f8592bee1a6f845df195"> 34</a></span> <span class="keyword">using</span> <a class="code hl_typedef" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a7147061a6e31f8592bee1a6f845df195">Index</a> = IndexType;</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"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a70df641c5212f2d7cd26b31595daa5b2"> 36</a></span> <a class="code hl_typedef" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a7147061a6e31f8592bee1a6f845df195">Index</a> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a70df641c5212f2d7cd26b31595daa5b2">index</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#af07d83f6746e367a50ed1d3d182015a1">index_</a>[<a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a551138be96f32581e2236d2468384adf">i_</a>.value()]; }</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a8d1325f6bfc62504f70bb527af18bbd8"> 37</a></span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a8d1325f6bfc62504f70bb527af18bbd8">coefficient</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#aa5073f3fbade604ea7ce5b99612b2778">coefficient_</a>[<a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#af07d83f6746e367a50ed1d3d182015a1">index_</a>[<a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a551138be96f32581e2236d2468384adf">i_</a>.value()].value()];</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> }</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a4935ccdae91c8a4748a85d75066a7ad4"> 42</a></span> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a4935ccdae91c8a4748a85d75066a7ad4">ScatteredVectorEntry</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a7147061a6e31f8592bee1a6f845df195">Index</a>* indices, <span class="keyword">const</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a>* <a class="code hl_variable" href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a>,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> EntryIndex i)</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> : <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a551138be96f32581e2236d2468384adf">i_</a>(i), <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#af07d83f6746e367a50ed1d3d182015a1">index_</a>(indices), <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#aa5073f3fbade604ea7ce5b99612b2778">coefficient_</a>(<a class="code hl_variable" href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a>) {}</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a551138be96f32581e2236d2468384adf"> 46</a></span> EntryIndex <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a551138be96f32581e2236d2468384adf">i_</a>;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#af07d83f6746e367a50ed1d3d182015a1"> 47</a></span> <span class="keyword">const</span> <a class="code hl_typedef" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a7147061a6e31f8592bee1a6f845df195">Index</a>* <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#af07d83f6746e367a50ed1d3d182015a1">index_</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#aa5073f3fbade604ea7ce5b99612b2778"> 48</a></span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a>* <a class="code hl_variable" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#aa5073f3fbade604ea7ce5b99612b2778">coefficient_</a>;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>};</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">// A simple struct that contains a DenseVector and its non-zero indices.</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">// TODO(user): This should be changed from struct to class.</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">Index</a>,</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">typename</span> Iterator = <a class="code hl_class" href="classoperations__research_1_1glop_1_1_vector_iterator.html">VectorIterator&lt;ScatteredVectorEntry&lt;Index&gt;</a>&gt;&gt;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html"> 55</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_vector.html">ScatteredVector</a> {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4"> 56</a></span> <a class="code hl_class" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">StrictITIVector&lt;Index, Fractional&gt;</a> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">// This can be left empty in which case we just have the dense representation</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="comment">// above. Otherwise, it should always be a superset of the actual non-zeros.</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a56e67c2fc5b21fd62d8776fa4b149ce6"> 60</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a56e67c2fc5b21fd62d8776fa4b149ce6">non_zeros_are_sorted</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b"> 61</a></span> std::vector&lt;Index&gt; <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="comment">// Temporary vector used in some sparse computation on the ScatteredVector.</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// True indicates a possible non-zero value. Note that its state is not always</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// consistent.</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f"> 66</a></span> <a class="code hl_class" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">StrictITIVector&lt;Index, bool&gt;</a> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// In many cases there is a choice between treating the ScatteredVector as</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment">// dense or as sparse. By default, dense algorithms are used when the</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// proportion of non-zero entries is greater than</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// kDefaultRatioForUsingDenseIteration.</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment">//</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// TODO(user): The constant should depend on what algorithm is used. Clearing</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// a dense vector is a lot more efficient than doing more complex stuff. Clean</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="comment">// this up by extracting all the currently used constants in one place with</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">// meaningful names.</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a0753f0ce8e5cc6a10abf542c172fbed2"> 77</a></span> <span class="keyword">constexpr</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a0753f0ce8e5cc6a10abf542c172fbed2">kDefaultRatioForUsingDenseIteration</a> = 0.8;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae2e345240a7ff49b7c5c03806fa398c5"> 79</a></span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae2e345240a7ff49b7c5c03806fa398c5">operator[]</a>(<a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">Index</a> <a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>]; }</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a876035099f25f333222be0af361a3e25"> 80</a></span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a>&amp; <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a876035099f25f333222be0af361a3e25">operator[]</a>(<a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">Index</a> <a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>) { <span class="keywordflow">return</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>]; }</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="comment">// The iterator syntax for (auto entry : v) where v is a ScatteredVector only</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="comment">// works when non_zeros is populated (i.e., when the vector is treated as</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="comment">// sparse).</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a09dd208593b9721a30a83ed978ede577"> 85</a></span> Iterator <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a09dd208593b9721a30a83ed978ede577">begin</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(!<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.empty() || <a class="code hl_function" href="namespaceoperations__research_1_1glop.html#a386d851d7c8b409205dd82d87e44f2fe">IsAllZero</a>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>));</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span> Iterator(this-&gt;non_zeros.data(), this-&gt;values.data(), EntryIndex(0));</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a62469461ed7c932afba3808f4da0fe3d"> 89</a></span> Iterator <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a62469461ed7c932afba3808f4da0fe3d">end</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keywordflow">return</span> Iterator(this-&gt;non_zeros.data(), this-&gt;values.data(),</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> EntryIndex(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.size()));</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</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"> 94</span> <span class="comment">// Add the given value to the vector at position index. This interface</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="comment">// encapsulates usage of the &quot;is_non_zero&quot; array, which should not be</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="comment">// explicitly referenced outside of this struct.</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a9bb4f0967311f0f79a279879c4d69678"> 97</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a9bb4f0967311f0f79a279879c4d69678">Add</a>(<a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">Index</a> <a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>, <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>) {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>] += <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>] &amp;&amp; <a class="code hl_variable" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a> != 0.0) {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.push_back(<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a56e67c2fc5b21fd62d8776fa4b149ce6">non_zeros_are_sorted</a> = <span class="keyword">false</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> }</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="comment">// Sorting the non-zeros is not always needed, but it allows us to have</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="comment">// exactly the same behavior while using a sparse iteration or a dense one. So</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="comment">// we always do it after a Solve().</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a338e6419a77aec6ea4340687c44f08f0"> 109</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a338e6419a77aec6ea4340687c44f08f0">SortNonZerosIfNeeded</a>() {</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a56e67c2fc5b21fd62d8776fa4b149ce6">non_zeros_are_sorted</a>) {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> std::sort(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.begin(), <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.end());</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a56e67c2fc5b21fd62d8776fa4b149ce6">non_zeros_are_sorted</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// Returns true if it is more advantageous to use a dense iteration rather</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="comment">// than using the non-zeros positions.</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a73934bd40690bdc3cbe36d6fbb0ecad5"> 118</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a73934bd40690bdc3cbe36d6fbb0ecad5">ShouldUseDenseIteration</a>(</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordtype">double</span> ratio_for_using_dense_representation)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.empty()) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.size()) &gt;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> ratio_for_using_dense_representation *</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>.<a class="code hl_function" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>().value());</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> }</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa1660c5702eb0d8890c365149f9fa68c"> 126</a></span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa1660c5702eb0d8890c365149f9fa68c">ShouldUseDenseIteration</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">return</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa1660c5702eb0d8890c365149f9fa68c">ShouldUseDenseIteration</a>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a0753f0ce8e5cc6a10abf542c172fbed2">kDefaultRatioForUsingDenseIteration</a>);</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> }</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> <span class="comment">// Efficiently clears the is_non_zero vector.</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a824e6b41b839a9f0ce98b10d3b84046d"> 131</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a824e6b41b839a9f0ce98b10d3b84046d">ClearSparseMask</a>() {</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa1660c5702eb0d8890c365149f9fa68c">ShouldUseDenseIteration</a>()) {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>.<a class="code hl_function" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#af8d7048738ceb4c753b040e6d29db79c">assign</a>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>.<a class="code hl_function" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>(), <span class="keyword">false</span>);</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>.<a class="code hl_function" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a64b6b04f3a519d2c61d49daaa88bf06e">resize</a>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>.<a class="code hl_function" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>(), <span class="keyword">false</span>);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">Index</a> <a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a> : <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>) {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>] = <span class="keyword">false</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> <a class="code hl_define" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(<a class="code hl_function" href="namespaceoperations__research_1_1glop.html#a66f88d7a4bcc601c81b7d694bcfae840">IsAllFalse</a>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>));</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// Update the is_non_zero vector to be consistent with the non_zeros vector.</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a582acb7e40cf171c7f0ab27aacd67823"> 144</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a582acb7e40cf171c7f0ab27aacd67823">RepopulateSparseMask</a>() {</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a824e6b41b839a9f0ce98b10d3b84046d">ClearSparseMask</a>();</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">Index</a> <a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a> : <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>) <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">is_non_zero</a>[<a class="code hl_variable" href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a>] = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> }</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="comment">// If the proportion of non-zero entries is too large, clears the vector of</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="comment">// non-zeros.</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa01dd1032c527cbadf34ea39a02f799e"> 151</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa01dd1032c527cbadf34ea39a02f799e">ClearNonZerosIfTooDense</a>(<span class="keywordtype">double</span> ratio_for_using_dense_representation) {</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa1660c5702eb0d8890c365149f9fa68c">ShouldUseDenseIteration</a>(ratio_for_using_dense_representation)) {</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a824e6b41b839a9f0ce98b10d3b84046d">ClearSparseMask</a>();</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.clear();</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> }</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"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a5cc25bd734fdc7420783630ff327ca0e"> 158</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a5cc25bd734fdc7420783630ff327ca0e">ClearNonZerosIfTooDense</a>() {</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a5cc25bd734fdc7420783630ff327ca0e">ClearNonZerosIfTooDense</a>(<a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a0753f0ce8e5cc6a10abf542c172fbed2">kDefaultRatioForUsingDenseIteration</a>);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</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> <span class="comment">// Returns an over-estimate of the number of non-zeros. This is actually</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="comment">// exact for sparse vector, or the full size otherwise.</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a975b414f769cd320ff33ee9bd0c959bf"> 164</a></span> <span class="keywordtype">size_t</span> <a class="code hl_function" href="structoperations__research_1_1glop_1_1_scattered_vector.html#a975b414f769cd320ff33ee9bd0c959bf">NumNonZerosEstimate</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.empty() ? <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>.<a class="code hl_function" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>().value() : <a class="code hl_variable" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.size();</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> }</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>};</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="comment">// Specializations used in the code.</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_column_entry.html"> 170</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_column_entry.html">ScatteredColumnEntry</a> : <span class="keyword">public</span> <a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html">ScatteredVectorEntry</a>&lt;RowIndex&gt; {</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="comment">// Returns the row of the current entry.</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_column_entry.html#a9c4479749075080a547bbf63c28f1d83"> 173</a></span> RowIndex <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_column_entry.html#a9c4479749075080a547bbf63c28f1d83">row</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a70df641c5212f2d7cd26b31595daa5b2">index</a>(); }</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_column_entry.html#adc012db9a0b6b41343eda804530473b9"> 176</a></span> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_column_entry.html#adc012db9a0b6b41343eda804530473b9">ScatteredColumnEntry</a>(<span class="keyword">const</span> RowIndex* indices, <span class="keyword">const</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a>* <a class="code hl_variable" href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a>,</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> EntryIndex i)</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> : <a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html">ScatteredVectorEntry</a>&lt;RowIndex&gt;(indices, <a class="code hl_variable" href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a>, i) {}</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> </div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_row_entry.html"> 181</a></span><span class="keyword">class </span><a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_row_entry.html">ScatteredRowEntry</a> : <span class="keyword">public</span> <a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html">ScatteredVectorEntry</a>&lt;ColIndex&gt; {</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> <span class="comment">// Returns the column of the current entry.</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_row_entry.html#ad48fe3cb1dda2025731c6a5f768a7059"> 184</a></span> ColIndex <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_row_entry.html#ad48fe3cb1dda2025731c6a5f768a7059">column</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a70df641c5212f2d7cd26b31595daa5b2">index</a>(); }</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_scattered_row_entry.html#adc411e01e1769f3e90cfad1fc3fb00a1"> 187</a></span> <a class="code hl_function" href="classoperations__research_1_1glop_1_1_scattered_row_entry.html#adc411e01e1769f3e90cfad1fc3fb00a1">ScatteredRowEntry</a>(<span class="keyword">const</span> ColIndex* indices, <span class="keyword">const</span> <a class="code hl_typedef" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a>* <a class="code hl_variable" href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a>,</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> EntryIndex i)</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> : <a class="code hl_class" href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html">ScatteredVectorEntry</a>&lt;ColIndex&gt;(indices, <a class="code hl_variable" href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a>, i) {}</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span>};</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1glop.html#aa22f47d4ea7ed9248f2bc9a17e71bee0"> 192</a></span><span class="keyword">using</span> <a class="code hl_class" href="classoperations__research_1_1glop_1_1_vector_iterator.html">ScatteredColumnIterator</a> = <a class="code hl_class" href="classoperations__research_1_1glop_1_1_vector_iterator.html">VectorIterator&lt;ScatteredColumnEntry&gt;</a>;</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1glop.html#ab0c3745c1147f5e2a210b10acdaecf14"> 193</a></span><span class="keyword">using</span> <a class="code hl_class" href="classoperations__research_1_1glop_1_1_vector_iterator.html">ScatteredRowIterator</a> = <a class="code hl_class" href="classoperations__research_1_1glop_1_1_vector_iterator.html">VectorIterator&lt;ScatteredRowEntry&gt;</a>;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_column.html"> 195</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> : <span class="keyword">public</span> <a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_vector.html">ScatteredVector</a>&lt;RowIndex, ScatteredColumnIterator&gt; {};</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"><a class="line" href="structoperations__research_1_1glop_1_1_scattered_row.html"> 197</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_row.html">ScatteredRow</a> : <span class="keyword">public</span> <a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_vector.html">ScatteredVector</a>&lt;ColIndex, ScatteredRowIterator&gt; {};</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1glop.html#af6375d177c0b120cebef16673060d132"> 199</a></span><span class="keyword">inline</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_row.html">ScatteredRow</a>&amp; <a class="code hl_function" href="namespaceoperations__research_1_1glop.html#af6375d177c0b120cebef16673060d132">TransposedView</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a>&amp; c) {</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_row.html">ScatteredRow</a>&amp;<span class="keyword">&gt;</span>(c);</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"><a class="line" href="namespaceoperations__research_1_1glop.html#aee340b3a50b46073ec3e3a5b9e8280b4"> 202</a></span><span class="keyword">inline</span> <span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a>&amp; <a class="code hl_function" href="namespaceoperations__research_1_1glop.html#af6375d177c0b120cebef16673060d132">TransposedView</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_row.html">ScatteredRow</a>&amp; r) {</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><a class="code hl_struct" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a>&amp;<span class="keyword">&gt;</span>(r);</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span>}</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span>} <span class="comment">// namespace glop</span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span>} <span class="comment">// namespace operations_research</span></div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> </div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span><span class="preprocessor">#endif </span><span class="comment">// OR_TOOLS_LP_DATA_SCATTERED_VECTOR_H_</span></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_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#l00890">base/logging.h:890</a></div></div>
<div class="ttc" id="abasictypes_8h_html"><div class="ttname"><a href="basictypes_8h.html">basictypes.h</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="aclassoperations__research_1_1glop_1_1_scattered_column_entry_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_column_entry.html">operations_research::glop::ScatteredColumnEntry</a></div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00170">scattered_vector.h:170</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_column_entry_html_a9c4479749075080a547bbf63c28f1d83"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_column_entry.html#a9c4479749075080a547bbf63c28f1d83">operations_research::glop::ScatteredColumnEntry::row</a></div><div class="ttdeci">RowIndex row() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00173">scattered_vector.h:173</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_column_entry_html_adc012db9a0b6b41343eda804530473b9"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_column_entry.html#adc012db9a0b6b41343eda804530473b9">operations_research::glop::ScatteredColumnEntry::ScatteredColumnEntry</a></div><div class="ttdeci">ScatteredColumnEntry(const RowIndex *indices, const Fractional *coefficients, EntryIndex i)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00176">scattered_vector.h:176</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_row_entry_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_row_entry.html">operations_research::glop::ScatteredRowEntry</a></div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00181">scattered_vector.h:181</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_row_entry_html_ad48fe3cb1dda2025731c6a5f768a7059"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_row_entry.html#ad48fe3cb1dda2025731c6a5f768a7059">operations_research::glop::ScatteredRowEntry::column</a></div><div class="ttdeci">ColIndex column() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00184">scattered_vector.h:184</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_row_entry_html_adc411e01e1769f3e90cfad1fc3fb00a1"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_row_entry.html#adc411e01e1769f3e90cfad1fc3fb00a1">operations_research::glop::ScatteredRowEntry::ScatteredRowEntry</a></div><div class="ttdeci">ScatteredRowEntry(const ColIndex *indices, const Fractional *coefficients, EntryIndex i)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00187">scattered_vector.h:187</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html">operations_research::glop::ScatteredVectorEntry</a></div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00032">scattered_vector.h:32</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_a4935ccdae91c8a4748a85d75066a7ad4"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a4935ccdae91c8a4748a85d75066a7ad4">operations_research::glop::ScatteredVectorEntry::ScatteredVectorEntry</a></div><div class="ttdeci">ScatteredVectorEntry(const Index *indices, const Fractional *coefficients, EntryIndex i)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00042">scattered_vector.h:42</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_a551138be96f32581e2236d2468384adf"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a551138be96f32581e2236d2468384adf">operations_research::glop::ScatteredVectorEntry::i_</a></div><div class="ttdeci">EntryIndex i_</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00046">scattered_vector.h:46</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_a70df641c5212f2d7cd26b31595daa5b2"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a70df641c5212f2d7cd26b31595daa5b2">operations_research::glop::ScatteredVectorEntry::index</a></div><div class="ttdeci">Index index() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00036">scattered_vector.h:36</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_a7147061a6e31f8592bee1a6f845df195"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a7147061a6e31f8592bee1a6f845df195">operations_research::glop::ScatteredVectorEntry::Index</a></div><div class="ttdeci">IndexType Index</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00034">scattered_vector.h:34</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_a8d1325f6bfc62504f70bb527af18bbd8"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#a8d1325f6bfc62504f70bb527af18bbd8">operations_research::glop::ScatteredVectorEntry::coefficient</a></div><div class="ttdeci">Fractional coefficient() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00037">scattered_vector.h:37</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_aa5073f3fbade604ea7ce5b99612b2778"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#aa5073f3fbade604ea7ce5b99612b2778">operations_research::glop::ScatteredVectorEntry::coefficient_</a></div><div class="ttdeci">const Fractional * coefficient_</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00048">scattered_vector.h:48</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_scattered_vector_entry_html_af07d83f6746e367a50ed1d3d182015a1"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_scattered_vector_entry.html#af07d83f6746e367a50ed1d3d182015a1">operations_research::glop::ScatteredVectorEntry::index_</a></div><div class="ttdeci">const Index * index_</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00047">scattered_vector.h:47</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_strict_i_t_i_vector_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">operations_research::glop::StrictITIVector&lt; Index, Fractional &gt;</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_strict_i_t_i_vector_html_a64b6b04f3a519d2c61d49daaa88bf06e"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a64b6b04f3a519d2c61d49daaa88bf06e">operations_research::glop::StrictITIVector::resize</a></div><div class="ttdeci">void resize(IntType size)</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00273">lp_types.h:273</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_strict_i_t_i_vector_html_a967a5c081ad4195a30c78dc2c0bcabf5"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">operations_research::glop::StrictITIVector::size</a></div><div class="ttdeci">IntType size() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00280">lp_types.h:280</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_strict_i_t_i_vector_html_af8d7048738ceb4c753b040e6d29db79c"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#af8d7048738ceb4c753b040e6d29db79c">operations_research::glop::StrictITIVector::assign</a></div><div class="ttdeci">void assign(IntType size, const T &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00278">lp_types.h:278</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_vector_iterator_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_vector_iterator.html">operations_research::glop::VectorIterator</a></div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00360">lp_types.h:360</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="agscip__solver_8cc_html_aa59e74cc299dbf75fa6e2234dd0849a2"><div class="ttname"><a href="gscip__solver_8cc.html#aa59e74cc299dbf75fa6e2234dd0849a2">coefficients</a></div><div class="ttdeci">absl::Span&lt; const double &gt; coefficients</div><div class="ttdef"><b>Definition:</b> <a href="gscip__solver_8cc_source.html#l00140">gscip_solver.cc:140</a></div></div>
<div class="ttc" id="alocal__search_8cc_html_a750b5d744c39a06bfb13e6eb010e35d0"><div class="ttname"><a href="local__search_8cc.html#a750b5d744c39a06bfb13e6eb010e35d0">index</a></div><div class="ttdeci">int index</div><div class="ttdef"><b>Definition:</b> <a href="local__search_8cc_source.html#l02750">local_search.cc:2750</a></div></div>
<div class="ttc" id="alp__types_8h_html"><div class="ttname"><a href="lp__types_8h.html">lp_types.h</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a386d851d7c8b409205dd82d87e44f2fe"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a386d851d7c8b409205dd82d87e44f2fe">operations_research::glop::IsAllZero</a></div><div class="ttdeci">bool IsAllZero(const Container &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8h_source.html#l00222">lp_data/lp_utils.h:222</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a66f88d7a4bcc601c81b7d694bcfae840"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a66f88d7a4bcc601c81b7d694bcfae840">operations_research::glop::IsAllFalse</a></div><div class="ttdeci">bool IsAllFalse(const BoolVector &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8h_source.html#l00231">lp_data/lp_utils.h:231</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a733947145e3e1631165b618b05c9ccb7"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">operations_research::glop::Fractional</a></div><div class="ttdeci">double Fractional</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00078">lp_types.h:78</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_ac89c7b45754e9a6bdabc08bea586fc4e"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#ac89c7b45754e9a6bdabc08bea586fc4e">operations_research::glop::Index</a></div><div class="ttdeci">int32_t Index</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00038">lp_types.h:38</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_af6375d177c0b120cebef16673060d132"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#af6375d177c0b120cebef16673060d132">operations_research::glop::TransposedView</a></div><div class="ttdeci">const ScatteredRow &amp; TransposedView(const ScatteredColumn &amp;c)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00199">scattered_vector.h:199</a></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="astructoperations__research_1_1glop_1_1_scattered_column_html"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_column.html">operations_research::glop::ScatteredColumn</a></div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00195">scattered_vector.h:196</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_row_html"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_row.html">operations_research::glop::ScatteredRow</a></div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00197">scattered_vector.h:197</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html">operations_research::glop::ScatteredVector</a></div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00055">scattered_vector.h:55</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a0753f0ce8e5cc6a10abf542c172fbed2"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a0753f0ce8e5cc6a10abf542c172fbed2">operations_research::glop::ScatteredVector::kDefaultRatioForUsingDenseIteration</a></div><div class="ttdeci">static constexpr const double kDefaultRatioForUsingDenseIteration</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00077">scattered_vector.h:77</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a09dd208593b9721a30a83ed978ede577"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a09dd208593b9721a30a83ed978ede577">operations_research::glop::ScatteredVector::begin</a></div><div class="ttdeci">Iterator begin() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00085">scattered_vector.h:85</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a338e6419a77aec6ea4340687c44f08f0"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a338e6419a77aec6ea4340687c44f08f0">operations_research::glop::ScatteredVector::SortNonZerosIfNeeded</a></div><div class="ttdeci">void SortNonZerosIfNeeded()</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00109">scattered_vector.h:109</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a56e67c2fc5b21fd62d8776fa4b149ce6"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a56e67c2fc5b21fd62d8776fa4b149ce6">operations_research::glop::ScatteredVector::non_zeros_are_sorted</a></div><div class="ttdeci">bool non_zeros_are_sorted</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00060">scattered_vector.h:60</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a582acb7e40cf171c7f0ab27aacd67823"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a582acb7e40cf171c7f0ab27aacd67823">operations_research::glop::ScatteredVector::RepopulateSparseMask</a></div><div class="ttdeci">void RepopulateSparseMask()</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00144">scattered_vector.h:144</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a5cc25bd734fdc7420783630ff327ca0e"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a5cc25bd734fdc7420783630ff327ca0e">operations_research::glop::ScatteredVector::ClearNonZerosIfTooDense</a></div><div class="ttdeci">void ClearNonZerosIfTooDense()</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00158">scattered_vector.h:158</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a62469461ed7c932afba3808f4da0fe3d"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a62469461ed7c932afba3808f4da0fe3d">operations_research::glop::ScatteredVector::end</a></div><div class="ttdeci">Iterator end() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00089">scattered_vector.h:89</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a73934bd40690bdc3cbe36d6fbb0ecad5"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a73934bd40690bdc3cbe36d6fbb0ecad5">operations_research::glop::ScatteredVector::ShouldUseDenseIteration</a></div><div class="ttdeci">bool ShouldUseDenseIteration(double ratio_for_using_dense_representation) const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00118">scattered_vector.h:118</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a824e6b41b839a9f0ce98b10d3b84046d"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a824e6b41b839a9f0ce98b10d3b84046d">operations_research::glop::ScatteredVector::ClearSparseMask</a></div><div class="ttdeci">void ClearSparseMask()</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00131">scattered_vector.h:131</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a876035099f25f333222be0af361a3e25"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a876035099f25f333222be0af361a3e25">operations_research::glop::ScatteredVector::operator[]</a></div><div class="ttdeci">Fractional &amp; operator[](Index index)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00080">scattered_vector.h:80</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a975b414f769cd320ff33ee9bd0c959bf"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a975b414f769cd320ff33ee9bd0c959bf">operations_research::glop::ScatteredVector::NumNonZerosEstimate</a></div><div class="ttdeci">size_t NumNonZerosEstimate() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00164">scattered_vector.h:164</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_a9bb4f0967311f0f79a279879c4d69678"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#a9bb4f0967311f0f79a279879c4d69678">operations_research::glop::ScatteredVector::Add</a></div><div class="ttdeci">void Add(Index index, Fractional value)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00097">scattered_vector.h:97</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_aa01dd1032c527cbadf34ea39a02f799e"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa01dd1032c527cbadf34ea39a02f799e">operations_research::glop::ScatteredVector::ClearNonZerosIfTooDense</a></div><div class="ttdeci">void ClearNonZerosIfTooDense(double ratio_for_using_dense_representation)</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00151">scattered_vector.h:151</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_aa1660c5702eb0d8890c365149f9fa68c"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#aa1660c5702eb0d8890c365149f9fa68c">operations_research::glop::ScatteredVector::ShouldUseDenseIteration</a></div><div class="ttdeci">bool ShouldUseDenseIteration() const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00126">scattered_vector.h:126</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_ac146d47daa294f7e6546c7569c9c881b"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">operations_research::glop::ScatteredVector::non_zeros</a></div><div class="ttdeci">std::vector&lt; Index &gt; non_zeros</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00061">scattered_vector.h:61</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_ac194aeeb3d13767546d461312169d86f"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac194aeeb3d13767546d461312169d86f">operations_research::glop::ScatteredVector::is_non_zero</a></div><div class="ttdeci">StrictITIVector&lt; Index, bool &gt; is_non_zero</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00066">scattered_vector.h:66</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_ae0473e18a367af671dc3f08063c80da4"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">operations_research::glop::ScatteredVector::values</a></div><div class="ttdeci">StrictITIVector&lt; Index, Fractional &gt; values</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00056">scattered_vector.h:56</a></div></div>
<div class="ttc" id="astructoperations__research_1_1glop_1_1_scattered_vector_html_ae2e345240a7ff49b7c5c03806fa398c5"><div class="ttname"><a href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae2e345240a7ff49b7c5c03806fa398c5">operations_research::glop::ScatteredVector::operator[]</a></div><div class="ttdeci">Fractional operator[](Index index) const</div><div class="ttdef"><b>Definition:</b> <a href="scattered__vector_8h_source.html#l00079">scattered_vector.h:79</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_903a7ff076ee7f01be86992fe717fc82.html">lp_data</a></li><li class="navelem"><a class="el" href="scattered__vector_8h.html">scattered_vector.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.3 </li>
</ul>
</div>
</body>
</html>