Files
ortools-clone/docs/cpp/primal__edge__norms_8cc_source.html
2021-01-26 11:34:47 +01:00

420 lines
75 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.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: primal_edge_norms.cc 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">8.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('primal__edge__norms_8cc_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">primal_edge_norms.cc</div> </div>
</div><!--header-->
<div class="contents">
<a href="primal__edge__norms_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Copyright 2010-2018 Google LLC</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// you may not use this file except in compliance with the License.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// limitations under the License.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="primal__edge__norms_8h.html">ortools/glop/primal_edge_norms.h</a>&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="timer_8h.html">ortools/base/timer.h</a>&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="lp__data_2lp__utils_8h.html">ortools/lp_data/lp_utils.h</a>&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="keyword">namespace </span>glop {</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a41fd24e395f2e06f7d702da9fba3ec3c"> 22</a></span>&#160;<a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a41fd24e395f2e06f7d702da9fba3ec3c">PrimalEdgeNorms::PrimalEdgeNorms</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html">CompactSparseMatrix</a>&amp; compact_matrix,</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_variables_info.html">VariablesInfo</a>&amp; variables_info,</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_basis_factorization.html">BasisFactorization</a>&amp; basis_factorization)</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; : compact_matrix_(compact_matrix),</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; variables_info_(variables_info),</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; basis_factorization_(basis_factorization),</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; stats_(),</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; recompute_edge_squared_norms_(true),</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; reset_devex_weights_(true),</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; edge_squared_norms_(),</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; matrix_column_norms_(),</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; devex_weights_(),</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; direction_left_inverse_(),</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; num_operations_(0) {}</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#aa71d36872f416feaa853788a7a7a7ef8"> 37</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#aa71d36872f416feaa853788a7a7a7ef8">PrimalEdgeNorms::Clear</a>() {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; recompute_edge_squared_norms_ = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; reset_devex_weights_ = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;}</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#af507437729fd1e93677772e748ca1cfc"> 43</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#af507437729fd1e93677772e748ca1cfc">PrimalEdgeNorms::NeedsBasisRefactorization</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordflow">return</span> recompute_edge_squared_norms_;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;}</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a67a5105630385abc274872ab7a28e70f"> 47</a></span>&#160;<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">DenseRow</a>&amp; <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a67a5105630385abc274872ab7a28e70f">PrimalEdgeNorms::GetEdgeSquaredNorms</a>() {</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordflow">if</span> (recompute_edge_squared_norms_) ComputeEdgeSquaredNorms();</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="keywordflow">return</span> edge_squared_norms_;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;}</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a6f599ec9c50fc8a7421f98203a06a428"> 52</a></span>&#160;<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">DenseRow</a>&amp; <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a6f599ec9c50fc8a7421f98203a06a428">PrimalEdgeNorms::GetDevexWeights</a>() {</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">if</span> (reset_devex_weights_) ResetDevexWeights();</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">return</span> devex_weights_;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;}</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a551ee6b517f861e2ad7557e092a9860d"> 57</a></span>&#160;<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">DenseRow</a>&amp; <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a551ee6b517f861e2ad7557e092a9860d">PrimalEdgeNorms::GetMatrixColumnNorms</a>() {</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordflow">if</span> (matrix_column_norms_.<a class="code" href="classabsl_1_1_strong_vector.html#a644718bb2fb240de962dc3c9a1fdf0dc">empty</a>()) ComputeMatrixColumnNorms();</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">return</span> matrix_column_norms_;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;}</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#ad3e807537a555d44d5e4a0da13f3768b"> 62</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#ad3e807537a555d44d5e4a0da13f3768b">PrimalEdgeNorms::TestEnteringEdgeNormPrecision</a>(</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; ColIndex entering_col, <span class="keyword">const</span> <a class="code" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a>&amp; direction) {</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordflow">if</span> (!recompute_edge_squared_norms_) {</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="comment">// Recompute the squared norm of the edge used during this</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="comment">// iteration, i.e. the entering edge. Note the PreciseSquaredNorm()</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="comment">// since it is a small price to pay for an increased precision.</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> old_squared_norm = edge_squared_norms_[entering_col];</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> precise_squared_norm = 1.0 + <a class="code" href="namespaceoperations__research_1_1glop.html#a1faa927dd93b43b3dea3eb2a993e30a1">PreciseSquaredNorm</a>(direction);</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; edge_squared_norms_[entering_col] = precise_squared_norm;</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> precise_norm = sqrt(precise_squared_norm);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> estimated_edges_norm_accuracy =</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; (precise_norm - sqrt(old_squared_norm)) / precise_norm;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; stats_.edges_norm_accuracy.Add(estimated_edges_norm_accuracy);</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keywordflow">if</span> (std::abs(estimated_edges_norm_accuracy) &gt;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; parameters_.recompute_edges_norm_threshold()) {</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="code" href="base_2logging_8h.html#afcaa7cadd41741bb855c2ada1d2ef927">VLOG</a>(1) &lt;&lt; <span class="stringliteral">&quot;Recomputing edge norms: &quot;</span> &lt;&lt; sqrt(precise_squared_norm)</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; &lt;&lt; <span class="stringliteral">&quot; vs &quot;</span> &lt;&lt; sqrt(old_squared_norm);</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; recompute_edge_squared_norms_ = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; }</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; }</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;}</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#ac770d9d78b0dda3be3bacb43038170e0"> 86</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#ac770d9d78b0dda3be3bacb43038170e0">PrimalEdgeNorms::UpdateBeforeBasisPivot</a>(ColIndex entering_col,</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; ColIndex leaving_col,</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; RowIndex leaving_row,</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keyword">const</span> <a class="code" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a>&amp; direction,</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <a class="code" href="classoperations__research_1_1glop_1_1_update_row.html">UpdateRow</a>* update_row) {</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="code" href="base_2logging_8h.html#a46e69120fbd3b36e6960e096d23b66f0">DCHECK_NE</a>(entering_col, leaving_col);</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">if</span> (!recompute_edge_squared_norms_) {</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; update_row-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_update_row.html#ac9f13d2561598d3a04b409dd7b4e1f0c">ComputeUpdateRow</a>(leaving_row);</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; ComputeDirectionLeftInverse(entering_col, direction);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; UpdateEdgeSquaredNorms(entering_col, leaving_col, leaving_row,</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; direction.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>, *update_row);</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">if</span> (!reset_devex_weights_) {</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">// Resets devex weights once in a while. If so, no need to update them</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="comment">// before.</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; ++num_devex_updates_since_reset_;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">if</span> (num_devex_updates_since_reset_ &gt;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; parameters_.devex_weights_reset_period()) {</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; reset_devex_weights_ = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; update_row-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_update_row.html#ac9f13d2561598d3a04b409dd7b4e1f0c">ComputeUpdateRow</a>(leaving_row);</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; UpdateDevexWeights(entering_col, leaving_col, leaving_row,</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; direction.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>, *update_row);</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; }</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; }</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;}</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; </div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="keywordtype">void</span> PrimalEdgeNorms::ComputeMatrixColumnNorms() {</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; matrix_column_norms_.<a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a64b6b04f3a519d2c61d49daaa88bf06e">resize</a>(compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#a41741829541d089f1c4d34f190884813">num_cols</a>(), 0.0);</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordflow">for</span> (ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>(0); <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a> &lt; compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#a41741829541d089f1c4d34f190884813">num_cols</a>(); ++<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>) {</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; matrix_column_norms_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] = sqrt(<a class="code" href="namespaceoperations__research_1_1glop.html#a2d53948bf5e999d006e781105aa8bc77">SquaredNorm</a>(compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#afbe7c81d6b4066bf7874299a0f7c0d59">column</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>)));</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; num_operations_ += compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#afbe7c81d6b4066bf7874299a0f7c0d59">column</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>).<a class="code" href="classoperations__research_1_1glop_1_1_column_view.html#af69d9b7065a8f31604a8134be4307749">num_entries</a>().value();</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; }</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;}</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="keywordtype">void</span> PrimalEdgeNorms::ComputeEdgeSquaredNorms() {</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="comment">// Since we will do a lot of inversions, it is better to be as efficient and</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="comment">// precise as possible by refactorizing the basis.</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <a class="code" href="base_2logging_8h.html#ae17f8119c108cf3070bad3449c7e0006">DCHECK</a>(basis_factorization_.<a class="code" href="classoperations__research_1_1glop_1_1_basis_factorization.html#a6e2a232672ee1580b9144f558662a77c">IsRefactorized</a>());</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; edge_squared_norms_.<a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a64b6b04f3a519d2c61d49daaa88bf06e">resize</a>(compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#a41741829541d089f1c4d34f190884813">num_cols</a>(), 0.0);</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a> : variables_info_.<a class="code" href="classoperations__research_1_1glop_1_1_variables_info.html#ac4385751c629a96a6d1ef5ac70af45e1">GetIsRelevantBitRow</a>()) {</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="comment">// Note the +1.0 in the squared norm for the component of the edge on the</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// &#39;entering_col&#39;.</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; edge_squared_norms_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] = 1.0 + basis_factorization_.<a class="code" href="classoperations__research_1_1glop_1_1_basis_factorization.html#a4bf241af6b1844669171d6e170ef991d">RightSolveSquaredNorm</a>(</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#afbe7c81d6b4066bf7874299a0f7c0d59">column</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>));</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; }</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; recompute_edge_squared_norms_ = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;}</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="comment">// TODO(user): It should be possible to reorganize the code and call this when</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="comment">// the value of direction is no longer needed. This will simplify the code and</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="comment">// avoid a copy here.</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="keywordtype">void</span> PrimalEdgeNorms::ComputeDirectionLeftInverse(</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; ColIndex entering_col, <span class="keyword">const</span> ScatteredColumn&amp; direction) {</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="comment">// Initialize direction_left_inverse_ to direction. Note the special case when</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// the non-zero vector is empty which means we don&#39;t know and need to use the</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// dense version.</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keyword">const</span> ColIndex size = <a class="code" href="namespaceoperations__research_1_1glop.html#a8fbc9efd86a3cc862a9079d86ab8b524">RowToColIndex</a>(direction.values.size());</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keyword">const</span> <span class="keywordtype">double</span> kThreshold = 0.05 * size.value();</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">if</span> (!direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.empty() &amp;&amp;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; (direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.size() + direction.non_zeros.size() &lt;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; 2 * kThreshold)) {</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#aa6c552b94fa80def1d4d1ea64697afb1">ClearAndResizeVectorWithNonZeros</a>(size, &amp;direction_left_inverse_);</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> e : direction) {</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; direction_left_inverse_[<a class="code" href="namespaceoperations__research_1_1glop.html#a8fbc9efd86a3cc862a9079d86ab8b524">RowToColIndex</a>(e.row())] = e.coefficient();</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; }</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a> = <a class="code" href="namespaceoperations__research_1_1glop.html#aaa803ce9366dca251925e0bdde517430">Transpose</a>(direction.values);</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.clear();</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; }</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordflow">if</span> (direction.non_zeros.size() &lt; kThreshold) {</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a> = <a class="code" href="namespaceoperations__research_1_1glop.html#af9f7793c79c67e9da1ce97c9e49de200">TransposedView</a>(direction).<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>;</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; }</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; basis_factorization_.<a class="code" href="classoperations__research_1_1glop_1_1_basis_factorization.html#aacdbeb58ac2d391f6586ad88db99ad61">LeftSolve</a>(&amp;direction_left_inverse_);</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="comment">// TODO(user): Refactorize if estimated accuracy above a threshold.</span></div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <a class="code" href="stats_8h.html#a3c3e6b102f0d91c523099325c98e1887">IF_STATS_ENABLED</a>(stats_.direction_left_inverse_accuracy.Add(</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a3d9874910f9632900fe8677463b1c0be">ScalarProduct</a>(direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>,</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; matrix_.column(entering_col)) -</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a2d53948bf5e999d006e781105aa8bc77">SquaredNorm</a>(direction.values)));</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="stats_8h.html#a3c3e6b102f0d91c523099325c98e1887">IF_STATS_ENABLED</a>(stats_.direction_left_inverse_density.Add(</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a6b36bbbcd695191600dab9b88487ff18">Density</a>(direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>)));</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;}</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<span class="comment">// Let new_edge denote the edge of &#39;col&#39; in the new basis. We want:</span></div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;<span class="comment">// reduced_costs_[col] = ScalarProduct(new_edge, basic_objective_);</span></div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;<span class="comment">// edge_squared_norms_[col] = SquaredNorm(new_edge);</span></div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;<span class="comment">// In order to compute this, we use the formulas:</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="comment">// new_leaving_edge = old_entering_edge / divisor.</span></div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;<span class="comment">// new_edge = old_edge + update_coeff * new_leaving_edge.</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;<span class="keywordtype">void</span> PrimalEdgeNorms::UpdateEdgeSquaredNorms(ColIndex entering_col,</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; ColIndex leaving_col,</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; RowIndex leaving_row,</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#ae5fa9e57c2d31b294195ed8a9e17bfac">DenseColumn</a>&amp; direction,</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keyword">const</span> UpdateRow&amp; update_row) {</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="comment">// &#39;pivot&#39; is the value of the entering_edge at &#39;leaving_row&#39;.</span></div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// The edge of the &#39;leaving_col&#39; in the new basis is equal to</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="comment">// entering_edge / &#39;pivot&#39;.</span></div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> pivot = -direction[leaving_row];</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <a class="code" href="base_2logging_8h.html#a46e69120fbd3b36e6960e096d23b66f0">DCHECK_NE</a>(pivot, 0.0);</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; </div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="comment">// Note that this should be precise because of the call to</span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="comment">// TestEnteringEdgeNormPrecision().</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> entering_squared_norm = edge_squared_norms_[entering_col];</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> leaving_squared_norm =</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <a class="code" href="alldiff__cst_8cc.html#a9d0c202d5fdd62f4fa2c613339ff168a">std::max</a>(1.0, entering_squared_norm / <a class="code" href="namespaceoperations__research_1_1glop.html#a1dcd08b0f6c19cd4a302bb5a3a6ea06e">Square</a>(pivot));</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keywordtype">int</span> stat_lower_bounded_norms = 0;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> factor = 2.0 / pivot;</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a> : update_row.GetNonZeroPositions()) {</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> coeff = update_row.GetCoefficient(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>);</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> scalar_product = compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#abdd940ad64b555052b33e763b80aea26">ColumnScalarProduct</a>(</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>, direction_left_inverse_.<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>);</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; num_operations_ += compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#afbe7c81d6b4066bf7874299a0f7c0d59">column</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>).<a class="code" href="classoperations__research_1_1glop_1_1_column_view.html#af69d9b7065a8f31604a8134be4307749">num_entries</a>().value();</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="comment">// Update the edge squared norm of this column. Note that the update</span></div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="comment">// formula used is important to maximize the precision. See an explanation</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// in the dual context in Koberstein&#39;s PhD thesis, section 8.2.2.1.</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; edge_squared_norms_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] +=</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; coeff * (coeff * leaving_squared_norm + factor * scalar_product);</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="comment">// Make sure it doesn&#39;t go under a known lower bound (TODO(user): ref?).</span></div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="comment">// This way norms are always &gt;= 1.0 .</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="comment">// TODO(user): precompute 1 / Square(pivot) or 1 / pivot? it will be</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// slightly faster, but may introduce numerical issues. More generally,</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="comment">// this test is only needed in a few cases, so is it worth it?</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> lower_bound = 1.0 + <a class="code" href="namespaceoperations__research_1_1glop.html#a1dcd08b0f6c19cd4a302bb5a3a6ea06e">Square</a>(coeff / pivot);</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="keywordflow">if</span> (edge_squared_norms_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] &lt; lower_bound) {</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; edge_squared_norms_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] = lower_bound;</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; ++stat_lower_bounded_norms;</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; }</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; }</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; edge_squared_norms_[leaving_col] = leaving_squared_norm;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; stats_.lower_bounded_norms.Add(stat_lower_bounded_norms);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;}</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;<span class="keywordtype">void</span> PrimalEdgeNorms::UpdateDevexWeights(</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; ColIndex entering_col <span class="comment">/* index q in the paper */</span>,</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; ColIndex leaving_col <span class="comment">/* index p in the paper */</span>, RowIndex leaving_row,</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#ae5fa9e57c2d31b294195ed8a9e17bfac">DenseColumn</a>&amp; direction, <span class="keyword">const</span> UpdateRow&amp; update_row) {</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="comment">// Compared to steepest edge update, the DEVEX weight uses the largest of the</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="comment">// norms of two vectors to approximate the norm of the sum.</span></div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> entering_norm = sqrt(<a class="code" href="namespaceoperations__research_1_1glop.html#a1faa927dd93b43b3dea3eb2a993e30a1">PreciseSquaredNorm</a>(direction));</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> pivot_magnitude = std::abs(direction[leaving_row]);</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> leaving_norm =</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="code" href="alldiff__cst_8cc.html#a9d0c202d5fdd62f4fa2c613339ff168a">std::max</a>(1.0, entering_norm / pivot_magnitude);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a> : update_row.GetNonZeroPositions()) {</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> coeff = update_row.GetCoefficient(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> update_vector_norm = std::abs(coeff) * leaving_norm;</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; devex_weights_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] = <a class="code" href="alldiff__cst_8cc.html#a9d0c202d5fdd62f4fa2c613339ff168a">std::max</a>(devex_weights_[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>], update_vector_norm);</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; }</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; devex_weights_[leaving_col] = leaving_norm;</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;}</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; </div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160;<span class="keywordtype">void</span> PrimalEdgeNorms::ResetDevexWeights() {</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <a class="code" href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a>(&amp;stats_);</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="keywordflow">if</span> (parameters_.initialize_devex_with_column_norms()) {</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; devex_weights_ = <a class="code" href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a551ee6b517f861e2ad7557e092a9860d">GetMatrixColumnNorms</a>();</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; devex_weights_.<a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#af8d7048738ceb4c753b040e6d29db79c">assign</a>(compact_matrix_.<a class="code" href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#a41741829541d089f1c4d34f190884813">num_cols</a>(), 1.0);</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; }</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; num_devex_updates_since_reset_ = 0;</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; reset_devex_weights_ = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;}</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;} <span class="comment">// namespace glop</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;} <span class="comment">// namespace operations_research</span></div>
<div class="ttc" id="aalldiff__cst_8cc_html_a9d0c202d5fdd62f4fa2c613339ff168a"><div class="ttname"><a href="alldiff__cst_8cc.html#a9d0c202d5fdd62f4fa2c613339ff168a">max</a></div><div class="ttdeci">int64 max</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_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#l00886">base/logging.h:886</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#l00884">base/logging.h:884</a></div></div>
<div class="ttc" id="abase_2logging_8h_html_afcaa7cadd41741bb855c2ada1d2ef927"><div class="ttname"><a href="base_2logging_8h.html#afcaa7cadd41741bb855c2ada1d2ef927">VLOG</a></div><div class="ttdeci">#define VLOG(verboselevel)</div><div class="ttdef"><b>Definition:</b> <a href="base_2logging_8h_source.html#l00978">base/logging.h:978</a></div></div>
<div class="ttc" id="aclassabsl_1_1_strong_vector_html_a644718bb2fb240de962dc3c9a1fdf0dc"><div class="ttname"><a href="classabsl_1_1_strong_vector.html#a644718bb2fb240de962dc3c9a1fdf0dc">absl::StrongVector::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdef"><b>Definition:</b> <a href="strong__vector_8h_source.html#l00156">strong_vector.h:156</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_basis_factorization_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_basis_factorization.html">operations_research::glop::BasisFactorization</a></div><div class="ttdef"><b>Definition:</b> <a href="basis__representation_8h_source.html#l00151">basis_representation.h:151</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_basis_factorization_html_a4bf241af6b1844669171d6e170ef991d"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_basis_factorization.html#a4bf241af6b1844669171d6e170ef991d">operations_research::glop::BasisFactorization::RightSolveSquaredNorm</a></div><div class="ttdeci">Fractional RightSolveSquaredNorm(const ColumnView &amp;a) const</div><div class="ttdef"><b>Definition:</b> <a href="basis__representation_8cc_source.html#l00466">basis_representation.cc:466</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_basis_factorization_html_a6e2a232672ee1580b9144f558662a77c"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_basis_factorization.html#a6e2a232672ee1580b9144f558662a77c">operations_research::glop::BasisFactorization::IsRefactorized</a></div><div class="ttdeci">bool IsRefactorized() const</div><div class="ttdef"><b>Definition:</b> <a href="basis__representation_8cc_source.html#l00214">basis_representation.cc:214</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_basis_factorization_html_aacdbeb58ac2d391f6586ad88db99ad61"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_basis_factorization.html#aacdbeb58ac2d391f6586ad88db99ad61">operations_research::glop::BasisFactorization::LeftSolve</a></div><div class="ttdeci">void LeftSolve(ScatteredRow *y) const</div><div class="ttdef"><b>Definition:</b> <a href="basis__representation_8cc_source.html#l00306">basis_representation.cc:306</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_column_view_html_af69d9b7065a8f31604a8134be4307749"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_column_view.html#af69d9b7065a8f31604a8134be4307749">operations_research::glop::ColumnView::num_entries</a></div><div class="ttdeci">EntryIndex num_entries() const</div><div class="ttdef"><b>Definition:</b> <a href="sparse__column_8h_source.html#l00082">sparse_column.h:82</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_compact_sparse_matrix_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html">operations_research::glop::CompactSparseMatrix</a></div><div class="ttdef"><b>Definition:</b> <a href="sparse_8h_source.html#l00288">sparse.h:288</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_compact_sparse_matrix_html_a41741829541d089f1c4d34f190884813"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#a41741829541d089f1c4d34f190884813">operations_research::glop::CompactSparseMatrix::num_cols</a></div><div class="ttdeci">ColIndex num_cols() const</div><div class="ttdef"><b>Definition:</b> <a href="sparse_8h_source.html#l00345">sparse.h:345</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_compact_sparse_matrix_html_abdd940ad64b555052b33e763b80aea26"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#abdd940ad64b555052b33e763b80aea26">operations_research::glop::CompactSparseMatrix::ColumnScalarProduct</a></div><div class="ttdeci">Fractional ColumnScalarProduct(ColIndex col, const DenseRow &amp;vector) const</div><div class="ttdef"><b>Definition:</b> <a href="sparse_8h_source.html#l00382">sparse.h:382</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_compact_sparse_matrix_html_afbe7c81d6b4066bf7874299a0f7c0d59"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_compact_sparse_matrix.html#afbe7c81d6b4066bf7874299a0f7c0d59">operations_research::glop::CompactSparseMatrix::column</a></div><div class="ttdeci">ColumnView column(ColIndex col) const</div><div class="ttdef"><b>Definition:</b> <a href="sparse_8h_source.html#l00364">sparse.h:364</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_a41fd24e395f2e06f7d702da9fba3ec3c"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a41fd24e395f2e06f7d702da9fba3ec3c">operations_research::glop::PrimalEdgeNorms::PrimalEdgeNorms</a></div><div class="ttdeci">PrimalEdgeNorms(const CompactSparseMatrix &amp;compact_matrix, const VariablesInfo &amp;variables_info, const BasisFactorization &amp;basis_factorization)</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00022">primal_edge_norms.cc:22</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_a551ee6b517f861e2ad7557e092a9860d"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a551ee6b517f861e2ad7557e092a9860d">operations_research::glop::PrimalEdgeNorms::GetMatrixColumnNorms</a></div><div class="ttdeci">const DenseRow &amp; GetMatrixColumnNorms()</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00057">primal_edge_norms.cc:57</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_a67a5105630385abc274872ab7a28e70f"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a67a5105630385abc274872ab7a28e70f">operations_research::glop::PrimalEdgeNorms::GetEdgeSquaredNorms</a></div><div class="ttdeci">const DenseRow &amp; GetEdgeSquaredNorms()</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00047">primal_edge_norms.cc:47</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_a6f599ec9c50fc8a7421f98203a06a428"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#a6f599ec9c50fc8a7421f98203a06a428">operations_research::glop::PrimalEdgeNorms::GetDevexWeights</a></div><div class="ttdeci">const DenseRow &amp; GetDevexWeights()</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00052">primal_edge_norms.cc:52</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_aa71d36872f416feaa853788a7a7a7ef8"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#aa71d36872f416feaa853788a7a7a7ef8">operations_research::glop::PrimalEdgeNorms::Clear</a></div><div class="ttdeci">void Clear()</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00037">primal_edge_norms.cc:37</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_ac770d9d78b0dda3be3bacb43038170e0"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#ac770d9d78b0dda3be3bacb43038170e0">operations_research::glop::PrimalEdgeNorms::UpdateBeforeBasisPivot</a></div><div class="ttdeci">void UpdateBeforeBasisPivot(ColIndex entering_col, ColIndex leaving_col, RowIndex leaving_row, const ScatteredColumn &amp;direction, UpdateRow *update_row)</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00086">primal_edge_norms.cc:86</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_ad3e807537a555d44d5e4a0da13f3768b"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#ad3e807537a555d44d5e4a0da13f3768b">operations_research::glop::PrimalEdgeNorms::TestEnteringEdgeNormPrecision</a></div><div class="ttdeci">void TestEnteringEdgeNormPrecision(ColIndex entering_col, const ScatteredColumn &amp;direction)</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00062">primal_edge_norms.cc:62</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_primal_edge_norms_html_af507437729fd1e93677772e748ca1cfc"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_primal_edge_norms.html#af507437729fd1e93677772e748ca1cfc">operations_research::glop::PrimalEdgeNorms::NeedsBasisRefactorization</a></div><div class="ttdeci">bool NeedsBasisRefactorization() const</div><div class="ttdef"><b>Definition:</b> <a href="primal__edge__norms_8cc_source.html#l00043">primal_edge_norms.cc:43</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; ColIndex, 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#l00269">lp_types.h:269</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#l00274">lp_types.h:274</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_update_row_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_update_row.html">operations_research::glop::UpdateRow</a></div><div class="ttdef"><b>Definition:</b> <a href="update__row_8h_source.html#l00038">update_row.h:38</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_update_row_html_ac9f13d2561598d3a04b409dd7b4e1f0c"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_update_row.html#ac9f13d2561598d3a04b409dd7b4e1f0c">operations_research::glop::UpdateRow::ComputeUpdateRow</a></div><div class="ttdeci">void ComputeUpdateRow(RowIndex leaving_row)</div><div class="ttdef"><b>Definition:</b> <a href="update__row_8cc_source.html#l00078">update_row.cc:78</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_variables_info_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_variables_info.html">operations_research::glop::VariablesInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="variables__info_8h_source.html#l00029">variables_info.h:29</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_variables_info_html_ac4385751c629a96a6d1ef5ac70af45e1"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_variables_info.html#ac4385751c629a96a6d1ef5ac70af45e1">operations_research::glop::VariablesInfo::GetIsRelevantBitRow</a></div><div class="ttdeci">const DenseBitRow &amp; GetIsRelevantBitRow() const</div><div class="ttdef"><b>Definition:</b> <a href="variables__info_8cc_source.html#l00113">variables_info.cc:113</a></div></div>
<div class="ttc" id="alp__data_2lp__utils_8h_html"><div class="ttname"><a href="lp__data_2lp__utils_8h.html">lp_utils.h</a></div></div>
<div class="ttc" id="amarkowitz_8cc_html_aa9d6c98fdf8d89b0e2321fda02adc82c"><div class="ttname"><a href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a></div><div class="ttdeci">ColIndex col</div><div class="ttdef"><b>Definition:</b> <a href="markowitz_8cc_source.html#l00176">markowitz.cc:176</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a1dcd08b0f6c19cd4a302bb5a3a6ea06e"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a1dcd08b0f6c19cd4a302bb5a3a6ea06e">operations_research::glop::Square</a></div><div class="ttdeci">Fractional Square(Fractional f)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8h_source.html#l00036">lp_data/lp_utils.h:36</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a1faa927dd93b43b3dea3eb2a993e30a1"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a1faa927dd93b43b3dea3eb2a993e30a1">operations_research::glop::PreciseSquaredNorm</a></div><div class="ttdeci">Fractional PreciseSquaredNorm(const SparseColumn &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8cc_source.html#l00038">lp_data/lp_utils.cc:38</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a2d53948bf5e999d006e781105aa8bc77"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a2d53948bf5e999d006e781105aa8bc77">operations_research::glop::SquaredNorm</a></div><div class="ttdeci">Fractional SquaredNorm(const SparseColumn &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8cc_source.html#l00030">lp_data/lp_utils.cc:30</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a3d9874910f9632900fe8677463b1c0be"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a3d9874910f9632900fe8677463b1c0be">operations_research::glop::ScalarProduct</a></div><div class="ttdeci">Fractional ScalarProduct(const DenseRowOrColumn1 &amp;u, const DenseRowOrColumn2 &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8h_source.html#l00047">lp_data/lp_utils.h:47</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a6b36bbbcd695191600dab9b88487ff18"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a6b36bbbcd695191600dab9b88487ff18">operations_research::glop::Density</a></div><div class="ttdeci">double Density(const DenseRow &amp;row)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8cc_source.html#l00106">lp_data/lp_utils.cc:106</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#l00077">lp_types.h:77</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a8fbc9efd86a3cc862a9079d86ab8b524"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a8fbc9efd86a3cc862a9079d86ab8b524">operations_research::glop::RowToColIndex</a></div><div class="ttdeci">ColIndex RowToColIndex(RowIndex row)</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00048">lp_types.h:48</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_aa6c552b94fa80def1d4d1ea64697afb1"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#aa6c552b94fa80def1d4d1ea64697afb1">operations_research::glop::ClearAndResizeVectorWithNonZeros</a></div><div class="ttdeci">void ClearAndResizeVectorWithNonZeros(IndexType size, ScatteredRowOrCol *v)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8h_source.html#l00278">lp_data/lp_utils.h:278</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_aaa803ce9366dca251925e0bdde517430"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#aaa803ce9366dca251925e0bdde517430">operations_research::glop::Transpose</a></div><div class="ttdeci">const DenseRow &amp; Transpose(const DenseColumn &amp;col)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_2lp__utils_8h_source.html#l00192">lp_data/lp_utils.h:192</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_ae5fa9e57c2d31b294195ed8a9e17bfac"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#ae5fa9e57c2d31b294195ed8a9e17bfac">operations_research::glop::DenseColumn</a></div><div class="ttdeci">StrictITIVector&lt; RowIndex, Fractional &gt; DenseColumn</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00328">lp_types.h:328</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_af9f7793c79c67e9da1ce97c9e49de200"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#af9f7793c79c67e9da1ce97c9e49de200">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#l00194">scattered_vector.h:194</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">The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...</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="aprimal__edge__norms_8h_html"><div class="ttname"><a href="primal__edge__norms_8h.html">primal_edge_norms.h</a></div></div>
<div class="ttc" id="astats_8h_html_a3c3e6b102f0d91c523099325c98e1887"><div class="ttname"><a href="stats_8h.html#a3c3e6b102f0d91c523099325c98e1887">IF_STATS_ENABLED</a></div><div class="ttdeci">#define IF_STATS_ENABLED(instructions)</div><div class="ttdef"><b>Definition:</b> <a href="stats_8h_source.html#l00435">stats.h:435</a></div></div>
<div class="ttc" id="astats_8h_html_a9995704aaaf45fc21e08c847551a8d04"><div class="ttname"><a href="stats_8h.html#a9995704aaaf45fc21e08c847551a8d04">SCOPED_TIME_STAT</a></div><div class="ttdeci">#define SCOPED_TIME_STAT(stats)</div><div class="ttdef"><b>Definition:</b> <a href="stats_8h_source.html#l00436">stats.h:436</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#l00190">scattered_vector.h:191</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#l00062">scattered_vector.h:62</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#l00057">scattered_vector.h:57</a></div></div>
<div class="ttc" id="atimer_8h_html"><div class="ttname"><a href="timer_8h.html">timer.h</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_747248fa8ec2ebcb4d8ad85ced34db0b.html">glop</a></li><li class="navelem"><a class="el" href="primal__edge__norms_8cc.html">primal_edge_norms.cc</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.1 </li>
</ul>
</div>
</body>
</html>