<!-- iframe showing the search results (closed by default) -->
<divid="MSearchResultsWindow">
<iframesrc="javascript:void(0)"frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<divclass="header">
<divclass="headertitle">
<divclass="title">variables_info.h</div></div>
</div><!--header-->
<divclass="contents">
<ahref="variables__info_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">// Copyright 2010-2018 Google LLC</span></div>
<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment">// See the License for the specific language governing permissions and</span></div>
<divclass="line"><aname="l00012"></a><spanclass="lineno"> 12</span> <spanclass="comment">// limitations under the License.</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment">// Class responsible for maintaining diverse information for each variable that</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment">// depend on its bounds and status.</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment">// Note(user): Not all information is needed at all time, but it is cheap to</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment">// maintain it since it only requires a few calls to Update() per simplex</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="comment">// Takes references to the linear program data we need.</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment">// Recomputes the variable types from the bounds (this is the only function</span></div>
<divclass="line"><aname="l00036"></a><spanclass="lineno"> 36</span> <spanclass="comment">// that changes them). This also resets all the non-type quantities to a</span></div>
<divclass="line"><aname="l00037"></a><spanclass="lineno"> 37</span> <spanclass="comment">// default value. Note however that nothing should be assumed on the return</span></div>
<divclass="line"><aname="l00038"></a><spanclass="lineno"> 38</span> <spanclass="comment">// values of the getters until Update() has been called at least once on all</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="comment">// the columns.</span></div>
<divclass="line"><aname="l00042"></a><spanclass="lineno"> 42</span> <spanclass="comment">// Updates the information of the given variable. Note that it is not needed</span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="comment">// to call this if the status or the bound of a variable didn't change.</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment">// Slightly optimized version of Update() above for the two separate cases.</span></div>
<divclass="line"><aname="l00050"></a><spanclass="lineno"> 50</span> <spanclass="comment">// Various getter, see the corresponding member declaration below for more</span></div>
<divclass="line"><aname="l00067"></a><spanclass="lineno"> 67</span> <spanclass="comment">// Changes whether or not a non-basic boxed variable is 'relevant' and will be</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="comment">// returned as such by GetIsRelevantBitRow().</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment">// This is used in UpdateRow to decide whether to compute it using the</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment">// row-wise or column-wise representation.</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</span> <spanclass="comment">// Returns the distance between the upper and lower bound of the given column.</span></div>
<divclass="line"><aname="l00081"></a><spanclass="lineno"> 81</span> <spanclass="comment">// Computes the variable type from its lower and upper bound.</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span> <spanclass="comment">// Sets the column relevance and updates num_entries_in_relevant_columns_.</span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> <spanclass="comment">// Problem data that should be updated from outside.</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> <spanclass="comment">// Array of variable statuses, indexed by column index.</span></div>
<divclass="line"><aname="l00095"></a><spanclass="lineno"> 95</span> <spanclass="comment">// Array of variable types, indexed by column index.</span></div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment">// Indicates if a non-basic variable can move up or down while not increasing</span></div>
<divclass="line"><aname="l00099"></a><spanclass="lineno"> 99</span> <spanclass="comment">// the primal infeasibility. Note that all combinaisons are possible for a</span></div>
<divclass="line"><aname="l00100"></a><spanclass="lineno"> 100</span> <spanclass="comment">// variable according to its status: fixed, free, upper or lower bounded. This</span></div>
<divclass="line"><aname="l00101"></a><spanclass="lineno"> 101</span> <spanclass="comment">// is always false for basic variable.</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="comment">// Indicates if we should consider this variable for entering the basis during</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment">// the simplex algorithm. We never consider fixed variables and in the dual</span></div>
<divclass="line"><aname="l00107"></a><spanclass="lineno"> 107</span> <spanclass="comment">// feasibility phase, we don't consider boxed variable.</span></div>
<divclass="line"><aname="l00110"></a><spanclass="lineno"> 110</span> <spanclass="comment">// Indicates if a variable is BASIC or not. There are currently two members</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"> 111</span> <spanclass="comment">// because the DenseBitRow class only supports a nice range-based iteration on</span></div>
<divclass="line"><aname="l00112"></a><spanclass="lineno"> 112</span> <spanclass="comment">// the non-zero positions and not on the others.</span></div>
<divclass="line"><aname="l00116"></a><spanclass="lineno"> 116</span> <spanclass="comment">// Set of boxed variables that are non-basic.</span></div>
<divclass="line"><aname="l00119"></a><spanclass="lineno"> 119</span> <spanclass="comment">// Number of entries for the relevant matrix columns (see relevance_).</span></div>
<divclass="line"><aname="l00122"></a><spanclass="lineno"> 122</span> <spanclass="comment">// Whether or not a boxed variable should be considered relevant.</span></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a8e726c118c4449d9d3c5761e2853661a"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a8e726c118c4449d9d3c5761e2853661a">operations_research::glop::VariablesInfo::GetNotBasicBitRow</a></div><divclass="ttdeci">const DenseBitRow & GetNotBasicBitRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00119">variables_info.cc:119</a></div></div>
<divclass="ttc"id="anamespaceoperations__research_html"><divclass="ttname"><ahref="namespaceoperations__research.html">operations_research</a></div><divclass="ttdoc">The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...</div><divclass="ttdef"><b>Definition:</b><ahref="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a2f2f9339835d7c7199d6bf8bb325aefd"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a2f2f9339835d7c7199d6bf8bb325aefd">operations_research::glop::VariablesInfo::GetVariableUpperBounds</a></div><divclass="ttdeci">const DenseRow & GetVariableUpperBounds() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8h_source.html#l00063">variables_info.h:63</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_ab4494c9680fc5d769a6143f11f00423b"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#ab4494c9680fc5d769a6143f11f00423b">operations_research::glop::VariablesInfo::GetStatusRow</a></div><divclass="ttdeci">const VariableStatusRow & GetStatusRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00101">variables_info.cc:101</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a89d50221a4ec3f33fd60e6424550c5f9"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a89d50221a4ec3f33fd60e6424550c5f9">operations_research::glop::VariablesInfo::GetVariableLowerBounds</a></div><divclass="ttdeci">const DenseRow & GetVariableLowerBounds() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8h_source.html#l00062">variables_info.h:62</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a6cc56ab5da3a82aa2793d18a37f422c4"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a6cc56ab5da3a82aa2793d18a37f422c4">operations_research::glop::VariablesInfo::GetCanIncreaseBitRow</a></div><divclass="ttdeci">const DenseBitRow & GetCanIncreaseBitRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00105">variables_info.cc:105</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a71d4734d51e7037c043b68a74bd7857f"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a71d4734d51e7037c043b68a74bd7857f">operations_research::glop::VariablesInfo::GetCanDecreaseBitRow</a></div><divclass="ttdeci">const DenseBitRow & GetCanDecreaseBitRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00109">variables_info.cc:109</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a28ad52f334e030f4eb45939756a4476c"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a28ad52f334e030f4eb45939756a4476c">operations_research::glop::VariablesInfo::GetIsBasicBitRow</a></div><divclass="ttdeci">const DenseBitRow & GetIsBasicBitRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00117">variables_info.cc:117</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_ac4385751c629a96a6d1ef5ac70af45e1"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#ac4385751c629a96a6d1ef5ac70af45e1">operations_research::glop::VariablesInfo::GetIsRelevantBitRow</a></div><divclass="ttdeci">const DenseBitRow & GetIsRelevantBitRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00113">variables_info.cc:113</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a505af340486fcf70ee83abb32e31a628"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a505af340486fcf70ee83abb32e31a628">operations_research::glop::VariablesInfo::GetNonBasicBoxedVariables</a></div><divclass="ttdeci">const DenseBitRow & GetNonBasicBoxedVariables() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00123">variables_info.cc:123</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1glop_1_1_variables_info_html_a78146b251b30383686ec55362254cc3b"><divclass="ttname"><ahref="classoperations__research_1_1glop_1_1_variables_info.html#a78146b251b30383686ec55362254cc3b">operations_research::glop::VariablesInfo::GetTypeRow</a></div><divclass="ttdeci">const VariableTypeRow & GetTypeRow() const</div><divclass="ttdef"><b>Definition:</b><ahref="variables__info_8cc_source.html#l00097">variables_info.cc:97</a></div></div>