Files
ortools-clone/docs/cpp/lp__data__utils_8cc_source.html
Mizux Seiha 3b7ffd12b0 Update doc
2020-10-09 12:01:52 +02:00

314 lines
62 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.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: lp_data_utils.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.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<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');
/* @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('lp__data__utils_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">lp_data_utils.cc</div> </div>
</div><!--header-->
<div class="contents">
<a href="lp__data__utils_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="lp__data__utils_8h.html">ortools/lp_data/lp_data_utils.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="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="keyword">namespace </span>glop {</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"><a class="line" href="namespaceoperations__research_1_1glop.html#abd4b14641c2dbc6319f036237a8c696c"> 19</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespaceoperations__research_1_1glop.html#abd4b14641c2dbc6319f036237a8c696c">ComputeSlackVariablesValues</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html">LinearProgram</a>&amp; linear_program,</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">DenseRow</a>* values) {</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; DCHECK(values);</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; DCHECK_EQ(linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#acd8437353d8dc686a75c98b5897dd871">num_variables</a>(), values-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>());</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; <span class="comment">// If there are no slack variable, we can give up.</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; <span class="keywordflow">if</span> (linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#a339d5516d8c29986233765e910257b4d">GetFirstSlackVariable</a>() == <a class="code" href="namespaceoperations__research_1_1glop.html#afb755b7934d8679476e2f05a89739bcd">kInvalidCol</a>) <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span>&amp; transposed_matrix = linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#a2175025047722705a3af86e54229f9cd">GetTransposeSparseMatrix</a>();</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="keywordflow">for</span> (RowIndex <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>(0); <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a> &lt; linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#afda9b9b5e858d0c466d2a6293361004a">num_constraints</a>(); <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>++) {</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keyword">const</span> ColIndex slack_variable = linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#a48de416333220c0bea7759c5aa53ee14">GetSlackVariable</a>(<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>);</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keywordflow">if</span> (slack_variable == <a class="code" href="namespaceoperations__research_1_1glop.html#afb755b7934d8679476e2f05a89739bcd">kInvalidCol</a>) <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; DCHECK_EQ(0.0, linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#a4e79763dc85eb10320835bca13697f4d">constraint_lower_bounds</a>()[<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>]);</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; DCHECK_EQ(0.0, linear_program.<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#aa4e5168f378a3a4e86dcf409faf14937">constraint_upper_bounds</a>()[<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>]);</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keyword">const</span> RowIndex transposed_slack = <a class="code" href="namespaceoperations__research_1_1glop.html#ab65a327cfc2a74c15fa26b91f19acc64">ColToRowIndex</a>(slack_variable);</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> activation = 0.0;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="comment">// Row in the initial matrix (column in the transposed).</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_sparse_column.html">SparseColumn</a>&amp; sparse_row =</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; transposed_matrix.column(<a class="code" href="namespaceoperations__research_1_1glop.html#a8fbc9efd86a3cc862a9079d86ab8b524">RowToColIndex</a>(<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>));</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; entry : sparse_row) {</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keywordflow">if</span> (transposed_slack == entry.index()) <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; activation +=</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; (*values)[<a class="code" href="namespaceoperations__research_1_1glop.html#a8fbc9efd86a3cc862a9079d86ab8b524">RowToColIndex</a>(entry.index())] * entry.coefficient();</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; (*values)[slack_variable] = -activation;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; }</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;}</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment">// This is separated from the LinearProgram class because of a cyclic dependency</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment">// when scaling as an LP.</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1glop.html#ac9c215aa509854e985e62d8cdf0a33cc"> 52</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespaceoperations__research_1_1glop.html#ac9c215aa509854e985e62d8cdf0a33cc">Scale</a>(<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html">LinearProgram</a>* lp, <a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html">SparseMatrixScaler</a>* scaler) {</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="comment">// Create GlopParameters proto to get default scaling algorithm.</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; GlopParameters params;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#ac9c215aa509854e985e62d8cdf0a33cc">Scale</a>(lp, scaler, params.scaling_method());</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"> 57</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment">// This is separated from LinearProgram class because of a cyclic dependency</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment">// when scaling as an LP.</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="namespaceoperations__research_1_1glop.html#a1a08072639a759f8cf7134407e4b0fac"> 60</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespaceoperations__research_1_1glop.html#ac9c215aa509854e985e62d8cdf0a33cc">Scale</a>(<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html">LinearProgram</a>* lp, <a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html">SparseMatrixScaler</a>* scaler,</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; GlopParameters::ScalingAlgorithm scaling_method) {</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a2dd7d09e2fe8d71850baa854b0edbf27">Init</a>(&amp;lp-&gt;matrix_);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#abc0a90242ca4f46222e707202f7918b0">Scale</a>(</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; scaling_method); <span class="comment">// Compute R and C, and replace the matrix A by R.A.C</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a57b3fbbeb1e0b5a127cc94694aad586e">ScaleRowVector</a>(<span class="keyword">false</span>,</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; &amp;lp-&gt;objective_coefficients_); <span class="comment">// oc = oc.C</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a57b3fbbeb1e0b5a127cc94694aad586e">ScaleRowVector</a>(<span class="keyword">true</span>,</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; &amp;lp-&gt;variable_upper_bounds_); <span class="comment">// cl = cl.C^-1</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a57b3fbbeb1e0b5a127cc94694aad586e">ScaleRowVector</a>(<span class="keyword">true</span>,</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; &amp;lp-&gt;variable_lower_bounds_); <span class="comment">// cu = cu.C^-1</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a150a7b18071b89f90d47aa00b679edc9">ScaleColumnVector</a>(<span class="keyword">false</span>, &amp;lp-&gt;constraint_upper_bounds_); <span class="comment">// rl = R.rl</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; scaler-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a150a7b18071b89f90d47aa00b679edc9">ScaleColumnVector</a>(<span class="keyword">false</span>, &amp;lp-&gt;constraint_lower_bounds_); <span class="comment">// ru = R.ru</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; lp-&gt;transpose_matrix_is_consistent_ = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;}</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a306cb123e8da242a6daf1c397dfe6e73"> 76</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a306cb123e8da242a6daf1c397dfe6e73">LpScalingHelper::Scale</a>(<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html">LinearProgram</a>* lp) {</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#aa71d36872f416feaa853788a7a7a7ef8">Clear</a>();</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a1a08072639a759f8cf7134407e4b0fac">::operations_research::glop::Scale</a>(</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; lp, &amp;scaler_, operations_research::glop::GlopParameters::DEFAULT);</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; bound_scaling_factor_ = 1.0 / lp-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#a354fba4c3eaf6cf38ee4f9e78a59f4c1">ScaleBounds</a>();</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; objective_scaling_factor_ = 1.0 / lp-&gt;<a class="code" href="classoperations__research_1_1glop_1_1_linear_program.html#ac5df4526af1b9ac31a38e84111d4f13a">ScaleObjective</a>();</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"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#aa71d36872f416feaa853788a7a7a7ef8"> 84</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#aa71d36872f416feaa853788a7a7a7ef8">LpScalingHelper::Clear</a>() {</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#aa71d36872f416feaa853788a7a7a7ef8">Clear</a>();</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; bound_scaling_factor_ = 1.0;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; objective_scaling_factor_ = 1.0;</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;}</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a5eb3e38eae8f5143d627e8c85aff8cd7"> 90</a></span>&#160;<a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a5eb3e38eae8f5143d627e8c85aff8cd7">LpScalingHelper::VariableScalingFactor</a>(ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="comment">// During scaling a col was multiplied by ColScalingFactor() and the variable</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// bounds divided by it.</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">return</span> scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">ColUnscalingFactor</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>) * bound_scaling_factor_;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;}</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a60d41c66b603be0ec7517d437e5c63ec"> 96</a></span>&#160;<a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a60d41c66b603be0ec7517d437e5c63ec">LpScalingHelper::UnscaleVariableValue</a>(ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>,</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="comment">// Just the opposite of ScaleVariableValue().</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">return</span> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a> / (scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">ColUnscalingFactor</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>) * bound_scaling_factor_);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;}</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; </div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a7bda8ecfedb49d8fe3fa3868b49b1588"> 102</a></span>&#160;<a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a7bda8ecfedb49d8fe3fa3868b49b1588">LpScalingHelper::UnscaleReducedCost</a>(ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>,</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="comment">// The reduced cost move like the objective and the col scale.</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordflow">return</span> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a> * scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">ColUnscalingFactor</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>) / objective_scaling_factor_;</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;}</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#ad59ff81132bc4f1ac9759c7bf20e6964"> 108</a></span>&#160;<a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#ad59ff81132bc4f1ac9759c7bf20e6964">LpScalingHelper::UnscaleDualValue</a>(RowIndex <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>,</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// The dual value move like the objective and the inverse of the row scale.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keywordflow">return</span> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a> / (scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ada52fc5d004939ec0a71b5302434af02">RowUnscalingFactor</a>(<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>) * objective_scaling_factor_);</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"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#adfdef00e17a2e0795dce8399a0ccb5fa"> 114</a></span>&#160;<a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#adfdef00e17a2e0795dce8399a0ccb5fa">LpScalingHelper::UnscaleConstraintActivity</a>(RowIndex <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>,</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a>)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="comment">// The activity move with the row_scale and the bound_scaling_factor.</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="keywordflow">return</span> <a class="code" href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a> * scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ada52fc5d004939ec0a71b5302434af02">RowUnscalingFactor</a>(<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>) / bound_scaling_factor_;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;}</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a81f7bb96d3d5e616410cca59f13eba73"> 120</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a81f7bb96d3d5e616410cca59f13eba73">LpScalingHelper::UnscaleUnitRowLeftSolve</a>(</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; ColIndex basis_col, <a class="code" href="structoperations__research_1_1glop_1_1_scattered_row.html">ScatteredRow</a>* left_inverse)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> global_factor = scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">ColUnscalingFactor</a>(basis_col);</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// We have left_inverse * [RowScale * B * ColScale] = unit_row.</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordflow">if</span> (left_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.empty()) {</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keyword">const</span> ColIndex num_rows = left_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>.<a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>();</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</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; num_rows; ++<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>) {</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; left_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] /=</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ada52fc5d004939ec0a71b5302434af02">RowUnscalingFactor</a>(<a class="code" href="namespaceoperations__research_1_1glop.html#ab65a327cfc2a74c15fa26b91f19acc64">ColToRowIndex</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>)) * global_factor;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; }</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a> : left_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>) {</div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; left_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>] /=</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ada52fc5d004939ec0a71b5302434af02">RowUnscalingFactor</a>(<a class="code" href="namespaceoperations__research_1_1glop.html#ab65a327cfc2a74c15fa26b91f19acc64">ColToRowIndex</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>)) * global_factor;</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; }</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"><a class="line" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#aaf4b73351a4b8c368c8dcfd4832f4250"> 139</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#aaf4b73351a4b8c368c8dcfd4832f4250">LpScalingHelper::UnscaleColumnRightSolve</a>(</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html">RowToColMapping</a>&amp; basis, ColIndex <a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>,</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <a class="code" href="structoperations__research_1_1glop_1_1_scattered_column.html">ScatteredColumn</a>* right_inverse)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keyword">const</span> <a class="code" href="namespaceoperations__research_1_1glop.html#a733947145e3e1631165b618b05c9ccb7">Fractional</a> global_factor = scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a0fda0916591d196bc6a237a40c89dc2b">ColScalingFactor</a>(<a class="code" href="markowitz_8cc.html#aa9d6c98fdf8d89b0e2321fda02adc82c">col</a>);</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="comment">// [RowScale * B * BColScale] * inverse = RowScale * column * ColScale.</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="comment">// That is B * (BColScale * inverse) = columm * ColScale[col].</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">if</span> (right_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>.empty()) {</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keyword">const</span> RowIndex num_rows = right_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>.<a class="code" href="classoperations__research_1_1glop_1_1_strict_i_t_i_vector.html#a967a5c081ad4195a30c78dc2c0bcabf5">size</a>();</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordflow">for</span> (RowIndex <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>(0); <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a> &lt; num_rows; ++<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>) {</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; right_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>] /=</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">ColUnscalingFactor</a>(basis[<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>]) * global_factor;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; }</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> RowIndex <a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a> : right_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ac146d47daa294f7e6546c7569c9c881b">non_zeros</a>) {</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; right_inverse-&gt;<a class="code" href="structoperations__research_1_1glop_1_1_scattered_vector.html#ae0473e18a367af671dc3f08063c80da4">values</a>[<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>] /=</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; scaler_.<a class="code" href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">ColUnscalingFactor</a>(basis[<a class="code" href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a>]) * global_factor;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; }</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;}</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;} <span class="comment">// namespace glop</span></div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;} <span class="comment">// namespace operations_research</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_ac5df4526af1b9ac31a38e84111d4f13a"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#ac5df4526af1b9ac31a38e84111d4f13a">operations_research::glop::LinearProgram::ScaleObjective</a></div><div class="ttdeci">Fractional ScaleObjective()</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8cc_source.html#l01134">lp_data.cc:1134</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_afda9b9b5e858d0c466d2a6293361004a"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#afda9b9b5e858d0c466d2a6293361004a">operations_research::glop::LinearProgram::num_constraints</a></div><div class="ttdeci">RowIndex num_constraints() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8h_source.html#l00208">lp_data.h:208</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_ac9c215aa509854e985e62d8cdf0a33cc"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#ac9c215aa509854e985e62d8cdf0a33cc">operations_research::glop::Scale</a></div><div class="ttdeci">void Scale(LinearProgram *lp, SparseMatrixScaler *scaler)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00052">lp_data_utils.cc:52</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_a81f7bb96d3d5e616410cca59f13eba73"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a81f7bb96d3d5e616410cca59f13eba73">operations_research::glop::LpScalingHelper::UnscaleUnitRowLeftSolve</a></div><div class="ttdeci">void UnscaleUnitRowLeftSolve(ColIndex basis_col, ScatteredRow *left_inverse) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00120">lp_data_utils.cc:120</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_afb755b7934d8679476e2f05a89739bcd"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#afb755b7934d8679476e2f05a89739bcd">operations_research::glop::kInvalidCol</a></div><div class="ttdeci">const ColIndex kInvalidCol(-1)</div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_a306cb123e8da242a6daf1c397dfe6e73"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a306cb123e8da242a6daf1c397dfe6e73">operations_research::glop::LpScalingHelper::Scale</a></div><div class="ttdeci">void Scale(LinearProgram *lp)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00076">lp_data_utils.cc:76</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_adfdef00e17a2e0795dce8399a0ccb5fa"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#adfdef00e17a2e0795dce8399a0ccb5fa">operations_research::glop::LpScalingHelper::UnscaleConstraintActivity</a></div><div class="ttdeci">Fractional UnscaleConstraintActivity(RowIndex row, Fractional value) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00114">lp_data_utils.cc:114</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_a1a08072639a759f8cf7134407e4b0fac"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#a1a08072639a759f8cf7134407e4b0fac">operations_research::glop::Scale</a></div><div class="ttdeci">void Scale(LinearProgram *lp, SparseMatrixScaler *scaler, GlopParameters::ScalingAlgorithm scaling_method)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00060">lp_data_utils.cc:60</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_ac9e0ca12adc5a8695b7c203049ae6f56"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ac9e0ca12adc5a8695b7c203049ae6f56">operations_research::glop::SparseMatrixScaler::ColUnscalingFactor</a></div><div class="ttdeci">Fractional ColUnscalingFactor(ColIndex col) const</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00051">matrix_scaler.cc:51</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_a150a7b18071b89f90d47aa00b679edc9"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a150a7b18071b89f90d47aa00b679edc9">operations_research::glop::SparseMatrixScaler::ScaleColumnVector</a></div><div class="ttdeci">void ScaleColumnVector(bool up, DenseColumn *column_vector) const</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00175">matrix_scaler.cc:175</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_a339d5516d8c29986233765e910257b4d"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#a339d5516d8c29986233765e910257b4d">operations_research::glop::LinearProgram::GetFirstSlackVariable</a></div><div class="ttdeci">ColIndex GetFirstSlackVariable() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8cc_source.html#l00720">lp_data.cc:720</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_a57b3fbbeb1e0b5a127cc94694aad586e"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a57b3fbbeb1e0b5a127cc94694aad586e">operations_research::glop::SparseMatrixScaler::ScaleRowVector</a></div><div class="ttdeci">void ScaleRowVector(bool up, DenseRow *row_vector) const</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00170">matrix_scaler.cc:170</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#l00063">scattered_vector.h:63</a></div></div>
<div class="ttc" id="ademon__profiler_8cc_html_a21edc7ca4cc5802c8779d68556bc09cf"><div class="ttname"><a href="demon__profiler_8cc.html#a21edc7ca4cc5802c8779d68556bc09cf">value</a></div><div class="ttdeci">int64 value</div><div class="ttdef"><b>Definition:</b> <a href="demon__profiler_8cc_source.html#l00043">demon_profiler.cc:43</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#l00276">lp_types.h:276</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="aclassoperations__research_1_1glop_1_1_linear_program_html_a2175025047722705a3af86e54229f9cd"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#a2175025047722705a3af86e54229f9cd">operations_research::glop::LinearProgram::GetTransposeSparseMatrix</a></div><div class="ttdeci">const SparseMatrix &amp; GetTransposeSparseMatrix() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8cc_source.html#l00374">lp_data.cc:374</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_column_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_column.html">operations_research::glop::SparseColumn</a></div><div class="ttdef"><b>Definition:</b> <a href="sparse__column_8h_source.html#l00044">sparse_column.h:44</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_aa71d36872f416feaa853788a7a7a7ef8"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#aa71d36872f416feaa853788a7a7a7ef8">operations_research::glop::LpScalingHelper::Clear</a></div><div class="ttdeci">void Clear()</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00084">lp_data_utils.cc:84</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_ad59ff81132bc4f1ac9759c7bf20e6964"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#ad59ff81132bc4f1ac9759c7bf20e6964">operations_research::glop::LpScalingHelper::UnscaleDualValue</a></div><div class="ttdeci">Fractional UnscaleDualValue(RowIndex row, Fractional value) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00108">lp_data_utils.cc:108</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_abd4b14641c2dbc6319f036237a8c696c"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#abd4b14641c2dbc6319f036237a8c696c">operations_research::glop::ComputeSlackVariablesValues</a></div><div class="ttdeci">void ComputeSlackVariablesValues(const LinearProgram &amp;linear_program, DenseRow *values)</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00019">lp_data_utils.cc:19</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_a4e79763dc85eb10320835bca13697f4d"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#a4e79763dc85eb10320835bca13697f4d">operations_research::glop::LinearProgram::constraint_lower_bounds</a></div><div class="ttdeci">const DenseColumn &amp; constraint_lower_bounds() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8h_source.html#l00215">lp_data.h:215</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="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_aaf4b73351a4b8c368c8dcfd4832f4250"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#aaf4b73351a4b8c368c8dcfd4832f4250">operations_research::glop::LpScalingHelper::UnscaleColumnRightSolve</a></div><div class="ttdeci">void UnscaleColumnRightSolve(const RowToColMapping &amp;basis, ColIndex col, ScatteredColumn *right_inverse) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00139">lp_data_utils.cc:139</a></div></div>
<div class="ttc" id="alp__data__utils_8h_html"><div class="ttname"><a href="lp__data__utils_8h.html">lp_data_utils.h</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_ada52fc5d004939ec0a71b5302434af02"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#ada52fc5d004939ec0a71b5302434af02">operations_research::glop::SparseMatrixScaler::RowUnscalingFactor</a></div><div class="ttdeci">Fractional RowUnscalingFactor(RowIndex row) const</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00046">matrix_scaler.cc:46</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_abc0a90242ca4f46222e707202f7918b0"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#abc0a90242ca4f46222e707202f7918b0">operations_research::glop::SparseMatrixScaler::Scale</a></div><div class="ttdeci">void Scale(GlopParameters::ScalingAlgorithm method)</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00089">matrix_scaler.cc:89</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_lp_scaling_helper_html_a7bda8ecfedb49d8fe3fa3868b49b1588"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a7bda8ecfedb49d8fe3fa3868b49b1588">operations_research::glop::LpScalingHelper::UnscaleReducedCost</a></div><div class="ttdeci">Fractional UnscaleReducedCost(ColIndex col, Fractional value) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00102">lp_data_utils.cc:102</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#l00193">scattered_vector.h:193</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html">operations_research::glop::SparseMatrixScaler</a></div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8h_source.html#l00079">matrix_scaler.h:79</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_a354fba4c3eaf6cf38ee4f9e78a59f4c1"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#a354fba4c3eaf6cf38ee4f9e78a59f4c1">operations_research::glop::LinearProgram::ScaleBounds</a></div><div class="ttdeci">Fractional ScaleBounds()</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8cc_source.html#l01155">lp_data.cc:1155</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_a2dd7d09e2fe8d71850baa854b0edbf27"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a2dd7d09e2fe8d71850baa854b0edbf27">operations_research::glop::SparseMatrixScaler::Init</a></div><div class="ttdeci">void Init(SparseMatrix *matrix)</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00033">matrix_scaler.cc:33</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_a0fda0916591d196bc6a237a40c89dc2b"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#a0fda0916591d196bc6a237a40c89dc2b">operations_research::glop::SparseMatrixScaler::ColScalingFactor</a></div><div class="ttdeci">Fractional ColScalingFactor(ColIndex col) const</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00060">matrix_scaler.cc:60</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_a60d41c66b603be0ec7517d437e5c63ec"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a60d41c66b603be0ec7517d437e5c63ec">operations_research::glop::LpScalingHelper::UnscaleVariableValue</a></div><div class="ttdeci">Fractional UnscaleVariableValue(ColIndex col, Fractional value) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00096">lp_data_utils.cc:96</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_lp_scaling_helper_html_a5eb3e38eae8f5143d627e8c85aff8cd7"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_lp_scaling_helper.html#a5eb3e38eae8f5143d627e8c85aff8cd7">operations_research::glop::LpScalingHelper::VariableScalingFactor</a></div><div class="ttdeci">Fractional VariableScalingFactor(ColIndex col) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data__utils_8cc_source.html#l00090">lp_data_utils.cc:90</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_sparse_matrix_scaler_html_aa71d36872f416feaa853788a7a7a7ef8"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_sparse_matrix_scaler.html#aa71d36872f416feaa853788a7a7a7ef8">operations_research::glop::SparseMatrixScaler::Clear</a></div><div class="ttdeci">void Clear()</div><div class="ttdef"><b>Definition:</b> <a href="matrix__scaler_8cc_source.html#l00040">matrix_scaler.cc:40</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="amarkowitz_8cc_html_aea35f36ba98d5bbd8d033382f50c9e52"><div class="ttname"><a href="markowitz_8cc.html#aea35f36ba98d5bbd8d033382f50c9e52">row</a></div><div class="ttdeci">RowIndex row</div><div class="ttdef"><b>Definition:</b> <a href="markowitz_8cc_source.html#l00175">markowitz.cc:175</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html">operations_research::glop::LinearProgram</a></div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8h_source.html#l00055">lp_data.h:55</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#l00191">scattered_vector.h:192</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_acd8437353d8dc686a75c98b5897dd871"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#acd8437353d8dc686a75c98b5897dd871">operations_research::glop::LinearProgram::num_variables</a></div><div class="ttdeci">ColIndex num_variables() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8h_source.html#l00205">lp_data.h:205</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_a48de416333220c0bea7759c5aa53ee14"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#a48de416333220c0bea7759c5aa53ee14">operations_research::glop::LinearProgram::GetSlackVariable</a></div><div class="ttdeci">ColIndex GetSlackVariable(RowIndex row) const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8cc_source.html#l00724">lp_data.cc:724</a></div></div>
<div class="ttc" id="anamespaceoperations__research_1_1glop_html_ab65a327cfc2a74c15fa26b91f19acc64"><div class="ttname"><a href="namespaceoperations__research_1_1glop.html#ab65a327cfc2a74c15fa26b91f19acc64">operations_research::glop::ColToRowIndex</a></div><div class="ttdeci">RowIndex ColToRowIndex(ColIndex col)</div><div class="ttdef"><b>Definition:</b> <a href="lp__types_8h_source.html#l00051">lp_types.h:51</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#l00058">scattered_vector.h:58</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1glop_1_1_linear_program_html_aa4e5168f378a3a4e86dcf409faf14937"><div class="ttname"><a href="classoperations__research_1_1glop_1_1_linear_program.html#aa4e5168f378a3a4e86dcf409faf14937">operations_research::glop::LinearProgram::constraint_upper_bounds</a></div><div class="ttdeci">const DenseColumn &amp; constraint_upper_bounds() const</div><div class="ttdef"><b>Definition:</b> <a href="lp__data_8h_source.html#l00218">lp_data.h:218</a></div></div>
<!-- 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="lp__data__utils_8cc.html">lp_data_utils.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.8.20 </li>
</ul>
</div>
</body>
</html>