Files
ortools-clone/docs/cpp/piecewise__linear__function_8h_source.html
2021-04-27 23:00:03 +02:00

432 lines
80 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: piecewise_linear_function.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="orLogo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">OR-Tools
&#160;<span id="projectnumber">9.0</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('piecewise__linear__function_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">piecewise_linear_function.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="piecewise__linear__function_8h.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-2021 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="comment">// This file implements piecewise linear functions over int64_t. It is built</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// by inserting segments.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">// This class maintains a minimal internal representation and checks for</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">// overflow.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#ifndef OR_TOOLS_UTIL_PIECEWISE_LINEAR_FUNCTION_H_</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#define OR_TOOLS_UTIL_PIECEWISE_LINEAR_FUNCTION_H_</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="basictypes_8h.html">ortools/base/basictypes.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="integral__types_8h.html">ortools/base/integral_types.h</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="macros_8h.html">ortools/base/macros.h</a>&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="saturated__arithmetic_8h.html">ortools/util/saturated_arithmetic.h</a>&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceoperations__research.html">operations_research</a> {</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment">// This structure stores one straight line. It contains the start point, the</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment">// end point and the slope.</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment">// It is defined for x values between start_x and end_x.</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html"> 38</a></span>&#160;<span class="keyword">class </span><a class="code" href="classoperations__research_1_1_piecewise_segment.html">PiecewiseSegment</a> {</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a535295123475f146509112e5423154cc">PiecewiseSegment</a>(int64_t point_x, int64_t point_y, int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a3e0673c584a9281683e7d137fe7476cb">slope</a>,</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; int64_t other_point_x);</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"> 43</span>&#160; <span class="comment">// Returns the value of the segment at point x.</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a717f65b06206ba8cc7bbe1aa0c4a6c3b">Value</a>(int64_t x) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="comment">// Returns the start of the segment&#39;s domain.</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html#afcfbd07e95226dfc2556b43e41fe4fae"> 46</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#afcfbd07e95226dfc2556b43e41fe4fae">start_x</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> start_x_; }</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="comment">// Returns the end of the segment&#39;s domain.</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html#a812c497c8e21c8b38593fc358c2ae6fd"> 48</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a812c497c8e21c8b38593fc358c2ae6fd">end_x</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> end_x_; }</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="comment">// Returns the value at the start of the segment&#39;s domain.</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html#a47a1fa2007b506d4ec34e2794ef5b1e1"> 50</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a47a1fa2007b506d4ec34e2794ef5b1e1">start_y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a717f65b06206ba8cc7bbe1aa0c4a6c3b">Value</a>(start_x_); }</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// Returns the value at the end of the segment&#39;s domain.</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html#aa5f57f858a4566fdb393f06840c52fc8"> 52</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#aa5f57f858a4566fdb393f06840c52fc8">end_y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a717f65b06206ba8cc7bbe1aa0c4a6c3b">Value</a>(end_x_); }</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="comment">// Returns the segment&#39;s slope.</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html#a3e0673c584a9281683e7d137fe7476cb"> 54</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a3e0673c584a9281683e7d137fe7476cb">slope</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> slope_; }</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="comment">// Returns the intersection of the segment&#39;s extension with the y axis.</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_segment.html#aaae2d9393b903d8dea5e9afd1e49fae6"> 56</a></span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#aaae2d9393b903d8dea5e9afd1e49fae6">intersection_y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> intersection_y_; }</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">// Comparison method useful for sorting a sequence of segments.</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#afd287f1ff1de1124a2cd8a6fe79cb3fb">SortComparator</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html">PiecewiseSegment</a>&amp; segment1,</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html">PiecewiseSegment</a>&amp; segment2);</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="comment">// Comparison method useful for finding in which segment a point belongs.</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a77ce53a27b88c53f5fa438a08d00af34">FindComparator</a>(int64_t point, <span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html">PiecewiseSegment</a>&amp; segment);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="comment">// Expands segment to the specified endpoint, if it is further</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="comment">// than the current endpoint. The reference point of the segment</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="comment">// doesn&#39;t change for overflow reasons.</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a8829bfff4b5ca5e126ff3aa7e29e233c">ExpandEnd</a>(int64_t <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a812c497c8e21c8b38593fc358c2ae6fd">end_x</a>);</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="comment">// Adds &#39;constant&#39; to the &#39;x&#39; the segments.</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a251fcf13677473e1e7dc22481cedae13">AddConstantToX</a>(int64_t constant);</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="comment">// Adds &#39;constant&#39; to the &#39;y&#39; the segments.</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a8a76bb73d807580286eda7f04188553b">AddConstantToY</a>(int64_t constant);</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; std::string <a class="code" href="classoperations__research_1_1_piecewise_segment.html#a764be64f3029f8b8e23511061d8de355">DebugString</a>() <span class="keyword">const</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; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="comment">// Computes the value of the segment at point x, taking care of possible</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="comment">// overflows when the value x follow the x coordinate of the segment&#39;s</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="comment">// reference point.</span></div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; int64_t SafeValuePostReference(int64_t x) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="comment">// Computes the value of the segment at point x, taking care of possible</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="comment">// overflows when the value x follow the x coordinate of the segment&#39;s</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">// reference point.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; int64_t SafeValuePreReference(int64_t x) <span class="keyword">const</span>;</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; <span class="comment">// The x coordinate of the segment&#39;s left endpoint.</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; int64_t start_x_;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="comment">// The x coordinate of the segment&#39;s right endpoint.</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; int64_t end_x_;</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// The segment&#39;s slope.</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; int64_t slope_;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="comment">// The x coordinate of the segment&#39;s finite reference point.</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; int64_t reference_x_;</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="comment">// The y coordinate of the segment&#39;s finite reference point.</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; int64_t reference_y_;</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="comment">// The intersection of the segment&#39;s extension with the y axis.</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; int64_t intersection_y_;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;};</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="comment">// In mathematics, a piecewise linear function is a function composed</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="comment">// of straight-line, non overlapping sections.</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_linear_function.html"> 101</a></span>&#160;<span class="keyword">class </span><a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a> {</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classoperations__research_1_1_piecewise_linear_function.html#a5b390931557183bd4a55afe4cbf4e2ae"> 103</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a5b390931557183bd4a55afe4cbf4e2ae">kNotFound</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">// This API provides a factory for creating different families of Piecewise</span></div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="comment">// Linear Functions based on specific properties of each family. The</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="comment">// PiecewiseLinearFunction is composed by a set of PiecwiseSegments and upon</span></div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// creation is not modifiable but with the provided function operations.</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// The object returned by any of these builders in the factory is owned by</span></div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// the client code.</span></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; <span class="comment">// Builds the most generic form of multiple-segment piecewise linear function</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="comment">// supporting domain holes. For a fixed index i the elements in points_x[i]</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="comment">// points_y[i], slopes[i], other_points_x[i] represent a segment.</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="comment">// The point (points_x[i], points_y[i]) represents one of the endpoints of</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="comment">// the segment and the other_points_x[i] represents the x coordinate of the</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="comment">// other endpoint which may precede, follow or coincide with points_x[i].</span></div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// The segments represented by these vectors should not be overlapping.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="comment">// Common endpoints are allowed.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#aca73fef94832f1ac2ee9fca0642ebd8f">CreatePiecewiseLinearFunction</a>(</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; std::vector&lt;int64_t&gt; points_x, std::vector&lt;int64_t&gt; points_y,</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; std::vector&lt;int64_t&gt; slopes, std::vector&lt;int64_t&gt; other_points_x);</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">// Builds a multiple-segment step function with continuous or non continuous</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="comment">// domain. The arguments have the same semantics with the generic builder of</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="comment">// the piecewise linear function. In the step function all the slopes are 0.</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a455a939cda40e7ff7441a6319c3d2e56">CreateStepFunction</a>(</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; std::vector&lt;int64_t&gt; points_x, std::vector&lt;int64_t&gt; points_y,</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; std::vector&lt;int64_t&gt; other_points_x);</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="comment">// Builds a multiple-segment piecewise linear function with domain from</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// from kint64min to kint64max with n points and n+1 slopes. Each slope</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// stops at the point with the corresponding index apart from the last one</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">// which stops at kint64max. The first slope stops at the first point at</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">// the level specified.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#aeeacbd4108ebdc295b15116f01cc562d">CreateFullDomainFunction</a>(</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; int64_t initial_level, std::vector&lt;int64_t&gt; points_x,</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; std::vector&lt;int64_t&gt; slopes);</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; </div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// Builds a function consisting of one segment.</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a7cb8cfbc85b138a4cb0b4bedc1a77c6b">CreateOneSegmentFunction</a>(</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; int64_t point_x, int64_t point_y, int64_t slope, int64_t other_point_x);</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">// Builds a function consisting of one ray starting at the specified</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="comment">// x and y coordinates with the specified slope.</span></div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a15a70d449d3ef680a50f76d2afadd58b">CreateRightRayFunction</a>(int64_t point_x,</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; int64_t point_y,</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; int64_t slope);</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="comment">// Builds a function consisting of one ray starting at the specified</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="comment">// x and y coordinates with the specified slope.</span></div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a3eb064b231f80fc943d2523bebd40f7d">CreateLeftRayFunction</a>(int64_t point_x,</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; int64_t point_y,</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; int64_t slope);</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="comment">// Builds a two-segment fixed charge piecewise linear cost function. For</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="comment">// values less than zero, the cost is zero. For values greater than zero,</span></div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">// cost follows the line specified by the slope and the value given as</span></div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">// arguments. The slope and value are positive.</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#aff444bc7eb89ca2032c2257b372d3a8b">CreateFixedChargeFunction</a>(int64_t slope,</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>);</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="comment">// Builds an earliness-tardiness two-segment piecewise linear cost function.</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="comment">// The reference specifies the point where the cost is zero. Before the</span></div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="comment">// reference, the cost increases with the earliness slope and after the</span></div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="comment">// referece, it increases with the tardiness slope. The absolute values of</span></div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="comment">// the slopes are given.</span></div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#af63285aea839cbec95812be2889e1d82">CreateEarlyTardyFunction</a>(</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; int64_t reference, int64_t earliness_slope, int64_t tardiness_slope);</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// Builds an earliness-tardiness three-segment piecewise linear cost function</span></div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// with a slack period around the due date. The early slack is the point</span></div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">// before which the cost increases with the ealiness slope specified. The</span></div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// late slack is the point after which the cost increases with the late slope</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// specified. Between the early and the late slack point, the cost is zero.</span></div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="comment">// The absolute values of the slopes are given.</span></div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keyword">static</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>* <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#ae735aab2f5e1d95727259f865ebb932a">CreateEarlyTardyFunctionWithSlack</a>(</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; int64_t early_slack, int64_t late_slack, int64_t earliness_slope,</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; int64_t tardiness_slope);</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// Returns if x is in the domain of the function.</span></div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a92b57f819267cc206b4029357215ede9">InDomain</a>(int64_t x) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="comment">// Determines whether the piecewise linear function is convex or non-convex</span></div>
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// and returns true when the function is convex.</span></div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a84a2672fd5402aad7e9f5ae67fe2a427">IsConvex</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <span class="comment">// Returns true if the piecewise linear function is non-decreasing.</span></div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a7acc75e402d8df05ec7993a45d9ddc6b">IsNonDecreasing</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="comment">// Returns true if the piecewise linear function is non-increasing.</span></div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a8b02afe47fa0bc52774a9efa649bd4c3">IsNonIncreasing</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="comment">// Returns the value of the piecewise linear function for x.</span></div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a717f65b06206ba8cc7bbe1aa0c4a6c3b">Value</a>(int64_t x) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// Returns the maximum value of all the segments in the function.</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a015ab667827df32553e28ce8aa79dbc2">GetMaximum</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="comment">// Returns the minimum value of all the segments in the function.</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a818e7c52ebc00242ecf48d078085d17f">GetMinimum</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="comment">// Returns the maximum endpoint value of the segments in the specified</span></div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="comment">// range. If the range is disjoint from the segments in the function, it</span></div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="comment">// returns kint64max.</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a015ab667827df32553e28ce8aa79dbc2">GetMaximum</a>(int64_t range_start, int64_t range_end) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="comment">// Returns the minimum endpoint value of the segments in the specified</span></div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="comment">// range. If the range is disjoint from the segments in the function, it</span></div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="comment">// returns kint64max.</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; int64_t <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a818e7c52ebc00242ecf48d078085d17f">GetMinimum</a>(int64_t range_start, int64_t range_end) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="comment">// Returns the smallest range within a given range containing all values</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="comment">// greater than a given value.</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; std::pair&lt;int64_t, int64_t&gt; <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a90537d020ac47907e6a02900693834a7">GetSmallestRangeGreaterThanValue</a>(</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; int64_t range_start, int64_t range_end, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="comment">// Returns the smallest range within a given range containing all values</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="comment">// less than a given value.</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; std::pair&lt;int64_t, int64_t&gt; <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#ac5987a001567895ed27e1e73dbf0a704">GetSmallestRangeLessThanValue</a>(</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; int64_t range_start, int64_t range_end, int64_t <a class="code" href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="comment">// Returns the smallest range within a given range containing all values</span></div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// greater than value_min and less than value_max.</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; std::pair&lt;int64_t, int64_t&gt; <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a506e927ec8e5dd90edb31c9c35965b98">GetSmallestRangeInValueRange</a>(</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; int64_t range_start, int64_t range_end, int64_t value_min,</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; int64_t value_max) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="comment">// Adds &#39;constant&#39; to the &#39;x&#39; of all segments. If the argument is positive,</span></div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="comment">// the translation is to the right and when it&#39;s negative, to the left. The</span></div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// overflows and the underflows are sticky.</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a251fcf13677473e1e7dc22481cedae13">AddConstantToX</a>(int64_t constant);</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <span class="comment">// Adds &#39;constant&#39; to the &#39;y&#39; of all segments. If the argument is positive,</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <span class="comment">// the translation is up and when it&#39;s negative, down. The overflows and the</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="comment">// underflows are sticky.</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a8a76bb73d807580286eda7f04188553b">AddConstantToY</a>(int64_t constant);</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="comment">// Adds the function to the existing one. The domain of the resulting</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="comment">// function is the intersection of the two domains. The overflows and</span></div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="comment">// the underflows are sticky.</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a78f2b8d3ca022083cdb9930fa0b15df5">Add</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>&amp; other);</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="comment">// Subtracts the function to the existing one. The domain of the</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="comment">// resulting function is the intersection of the two domains. The</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <span class="comment">// overflows and the underflows are sticky.</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a965281b565adae6a5f090c8f0e84f2fe">Subtract</a>(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>&amp; other);</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="comment">// Decomposes the piecewise linear function in a set of convex piecewise</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="comment">// linear functions. The objects in the vector are owned by the client code.</span></div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; std::vector&lt;PiecewiseLinearFunction*&gt; <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a731438f9b354082fd002cfce115cac12">DecomposeToConvexFunctions</a>() <span class="keyword">const</span>;</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"><a class="line" href="classoperations__research_1_1_piecewise_linear_function.html#a0bdc0f492ab96363e371e827cd46ef0e"> 238</a></span>&#160; <span class="keyword">const</span> std::vector&lt;PiecewiseSegment&gt;&amp; <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a0bdc0f492ab96363e371e827cd46ef0e">segments</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> segments_; }</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; std::string <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a764be64f3029f8b8e23511061d8de355">DebugString</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <span class="comment">// Takes the sequence of segments, sorts them on increasing start and inserts</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="comment">// them in the piecewise linear function.</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keyword">explicit</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>(std::vector&lt;PiecewiseSegment&gt; <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html#a0bdc0f492ab96363e371e827cd46ef0e">segments</a>);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="comment">// Inserts a segment in the function.</span></div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; <span class="keywordtype">void</span> InsertSegment(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_segment.html">PiecewiseSegment</a>&amp; segment);</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <span class="comment">// Operation between two functions. In any operation between two functions the</span></div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="comment">// final domain is the intersection between the two domains.</span></div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <span class="keywordtype">void</span> Operation(<span class="keyword">const</span> <a class="code" href="classoperations__research_1_1_piecewise_linear_function.html">PiecewiseLinearFunction</a>&amp; other,</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keyword">const</span> std::function&lt;int64_t(int64_t, int64_t)&gt;&amp; operation);</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="comment">// Finds start and end segment indices from a range; returns false if the</span></div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <span class="comment">// range is outside the domain of the function.</span></div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <span class="keywordtype">bool</span> FindSegmentIndicesFromRange(int64_t range_start, int64_t range_end,</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="keywordtype">int</span>* start_segment, <span class="keywordtype">int</span>* end_segment) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="keywordtype">void</span> UpdateStatus() {</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="keywordflow">if</span> (is_modified_) {</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; is_convex_ = IsConvexInternal();</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; is_non_decreasing_ = IsNonDecreasingInternal();</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; is_non_increasing_ = IsNonIncreasingInternal();</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; is_modified_ = <span class="keyword">false</span>;</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; }</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="keywordtype">bool</span> IsConvexInternal() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="keywordtype">bool</span> IsNonDecreasingInternal() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keywordtype">bool</span> IsNonIncreasingInternal() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="comment">// The vector of segments in the function, sorted in ascending order of start</span></div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="comment">// points.</span></div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; std::vector&lt;PiecewiseSegment&gt; segments_;</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <span class="keywordtype">bool</span> is_modified_;</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="keywordtype">bool</span> is_convex_;</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <span class="keywordtype">bool</span> is_non_decreasing_;</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="keywordtype">bool</span> is_non_increasing_;</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;};</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;} <span class="comment">// namespace operations_research</span></div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// OR_TOOLS_UTIL_PIECEWISE_LINEAR_FUNCTION_H_</span></div>
<div class="ttc" id="abasictypes_8h_html"><div class="ttname"><a href="basictypes_8h.html">basictypes.h</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html">operations_research::PiecewiseLinearFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00101">piecewise_linear_function.h:101</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a015ab667827df32553e28ce8aa79dbc2"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a015ab667827df32553e28ce8aa79dbc2">operations_research::PiecewiseLinearFunction::GetMaximum</a></div><div class="ttdeci">int64_t GetMaximum() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00509">piecewise_linear_function.cc:509</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a0bdc0f492ab96363e371e827cd46ef0e"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a0bdc0f492ab96363e371e827cd46ef0e">operations_research::PiecewiseLinearFunction::segments</a></div><div class="ttdeci">const std::vector&lt; PiecewiseSegment &gt; &amp; segments() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00238">piecewise_linear_function.h:238</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a15a70d449d3ef680a50f76d2afadd58b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a15a70d449d3ef680a50f76d2afadd58b">operations_research::PiecewiseLinearFunction::CreateRightRayFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateRightRayFunction(int64_t point_x, int64_t point_y, int64_t slope)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00357">piecewise_linear_function.cc:357</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a251fcf13677473e1e7dc22481cedae13"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a251fcf13677473e1e7dc22481cedae13">operations_research::PiecewiseLinearFunction::AddConstantToX</a></div><div class="ttdeci">void AddConstantToX(int64_t constant)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00619">piecewise_linear_function.cc:619</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a3eb064b231f80fc943d2523bebd40f7d"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a3eb064b231f80fc943d2523bebd40f7d">operations_research::PiecewiseLinearFunction::CreateLeftRayFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateLeftRayFunction(int64_t point_x, int64_t point_y, int64_t slope)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00364">piecewise_linear_function.cc:364</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a455a939cda40e7ff7441a6319c3d2e56"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a455a939cda40e7ff7441a6319c3d2e56">operations_research::PiecewiseLinearFunction::CreateStepFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateStepFunction(std::vector&lt; int64_t &gt; points_x, std::vector&lt; int64_t &gt; points_y, std::vector&lt; int64_t &gt; other_points_x)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00308">piecewise_linear_function.cc:308</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a506e927ec8e5dd90edb31c9c35965b98"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a506e927ec8e5dd90edb31c9c35965b98">operations_research::PiecewiseLinearFunction::GetSmallestRangeInValueRange</a></div><div class="ttdeci">std::pair&lt; int64_t, int64_t &gt; GetSmallestRangeInValueRange(int64_t range_start, int64_t range_end, int64_t value_min, int64_t value_max) const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00593">piecewise_linear_function.cc:593</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a5b390931557183bd4a55afe4cbf4e2ae"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a5b390931557183bd4a55afe4cbf4e2ae">operations_research::PiecewiseLinearFunction::kNotFound</a></div><div class="ttdeci">static const int kNotFound</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00103">piecewise_linear_function.h:103</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a717f65b06206ba8cc7bbe1aa0c4a6c3b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a717f65b06206ba8cc7bbe1aa0c4a6c3b">operations_research::PiecewiseLinearFunction::Value</a></div><div class="ttdeci">int64_t Value(int64_t x) const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00431">piecewise_linear_function.cc:431</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a731438f9b354082fd002cfce115cac12"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a731438f9b354082fd002cfce115cac12">operations_research::PiecewiseLinearFunction::DecomposeToConvexFunctions</a></div><div class="ttdeci">std::vector&lt; PiecewiseLinearFunction * &gt; DecomposeToConvexFunctions() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00642">piecewise_linear_function.cc:642</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a764be64f3029f8b8e23511061d8de355"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a764be64f3029f8b8e23511061d8de355">operations_research::PiecewiseLinearFunction::DebugString</a></div><div class="ttdeci">std::string DebugString() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00675">piecewise_linear_function.cc:675</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a78f2b8d3ca022083cdb9930fa0b15df5"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a78f2b8d3ca022083cdb9930fa0b15df5">operations_research::PiecewiseLinearFunction::Add</a></div><div class="ttdeci">void Add(const PiecewiseLinearFunction &amp;other)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00633">piecewise_linear_function.cc:633</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a7acc75e402d8df05ec7993a45d9ddc6b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a7acc75e402d8df05ec7993a45d9ddc6b">operations_research::PiecewiseLinearFunction::IsNonDecreasing</a></div><div class="ttdeci">bool IsNonDecreasing() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00421">piecewise_linear_function.cc:421</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a7cb8cfbc85b138a4cb0b4bedc1a77c6b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a7cb8cfbc85b138a4cb0b4bedc1a77c6b">operations_research::PiecewiseLinearFunction::CreateOneSegmentFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateOneSegmentFunction(int64_t point_x, int64_t point_y, int64_t slope, int64_t other_point_x)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00348">piecewise_linear_function.cc:348</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a818e7c52ebc00242ecf48d078085d17f"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a818e7c52ebc00242ecf48d078085d17f">operations_research::PiecewiseLinearFunction::GetMinimum</a></div><div class="ttdeci">int64_t GetMinimum() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00513">piecewise_linear_function.cc:513</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a84a2672fd5402aad7e9f5ae67fe2a427"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a84a2672fd5402aad7e9f5ae67fe2a427">operations_research::PiecewiseLinearFunction::IsConvex</a></div><div class="ttdeci">bool IsConvex() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00416">piecewise_linear_function.cc:416</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a8a76bb73d807580286eda7f04188553b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a8a76bb73d807580286eda7f04188553b">operations_research::PiecewiseLinearFunction::AddConstantToY</a></div><div class="ttdeci">void AddConstantToY(int64_t constant)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00626">piecewise_linear_function.cc:626</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a8b02afe47fa0bc52774a9efa649bd4c3"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a8b02afe47fa0bc52774a9efa649bd4c3">operations_research::PiecewiseLinearFunction::IsNonIncreasing</a></div><div class="ttdeci">bool IsNonIncreasing() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00426">piecewise_linear_function.cc:426</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a90537d020ac47907e6a02900693834a7"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a90537d020ac47907e6a02900693834a7">operations_research::PiecewiseLinearFunction::GetSmallestRangeGreaterThanValue</a></div><div class="ttdeci">std::pair&lt; int64_t, int64_t &gt; GetSmallestRangeGreaterThanValue(int64_t range_start, int64_t range_end, int64_t value) const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00518">piecewise_linear_function.cc:518</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a92b57f819267cc206b4029357215ede9"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a92b57f819267cc206b4029357215ede9">operations_research::PiecewiseLinearFunction::InDomain</a></div><div class="ttdeci">bool InDomain(int64_t x) const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00405">piecewise_linear_function.cc:405</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_a965281b565adae6a5f090c8f0e84f2fe"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#a965281b565adae6a5f090c8f0e84f2fe">operations_research::PiecewiseLinearFunction::Subtract</a></div><div class="ttdeci">void Subtract(const PiecewiseLinearFunction &amp;other)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00637">piecewise_linear_function.cc:637</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_ac5987a001567895ed27e1e73dbf0a704"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#ac5987a001567895ed27e1e73dbf0a704">operations_research::PiecewiseLinearFunction::GetSmallestRangeLessThanValue</a></div><div class="ttdeci">std::pair&lt; int64_t, int64_t &gt; GetSmallestRangeLessThanValue(int64_t range_start, int64_t range_end, int64_t value) const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00525">piecewise_linear_function.cc:525</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_aca73fef94832f1ac2ee9fca0642ebd8f"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#aca73fef94832f1ac2ee9fca0642ebd8f">operations_research::PiecewiseLinearFunction::CreatePiecewiseLinearFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreatePiecewiseLinearFunction(std::vector&lt; int64_t &gt; points_x, std::vector&lt; int64_t &gt; points_y, std::vector&lt; int64_t &gt; slopes, std::vector&lt; int64_t &gt; other_points_x)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00291">piecewise_linear_function.cc:291</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_ae735aab2f5e1d95727259f865ebb932a"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#ae735aab2f5e1d95727259f865ebb932a">operations_research::PiecewiseLinearFunction::CreateEarlyTardyFunctionWithSlack</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateEarlyTardyFunctionWithSlack(int64_t early_slack, int64_t late_slack, int64_t earliness_slope, int64_t tardiness_slope)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00392">piecewise_linear_function.cc:392</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_aeeacbd4108ebdc295b15116f01cc562d"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#aeeacbd4108ebdc295b15116f01cc562d">operations_research::PiecewiseLinearFunction::CreateFullDomainFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateFullDomainFunction(int64_t initial_level, std::vector&lt; int64_t &gt; points_x, std::vector&lt; int64_t &gt; slopes)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00324">piecewise_linear_function.cc:324</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_af63285aea839cbec95812be2889e1d82"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#af63285aea839cbec95812be2889e1d82">operations_research::PiecewiseLinearFunction::CreateEarlyTardyFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateEarlyTardyFunction(int64_t reference, int64_t earliness_slope, int64_t tardiness_slope)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00381">piecewise_linear_function.cc:381</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_linear_function_html_aff444bc7eb89ca2032c2257b372d3a8b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_linear_function.html#aff444bc7eb89ca2032c2257b372d3a8b">operations_research::PiecewiseLinearFunction::CreateFixedChargeFunction</a></div><div class="ttdeci">static PiecewiseLinearFunction * CreateFixedChargeFunction(int64_t slope, int64_t value)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00371">piecewise_linear_function.cc:371</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html">operations_research::PiecewiseSegment</a></div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00038">piecewise_linear_function.h:38</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a251fcf13677473e1e7dc22481cedae13"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a251fcf13677473e1e7dc22481cedae13">operations_research::PiecewiseSegment::AddConstantToX</a></div><div class="ttdeci">void AddConstantToX(int64_t constant)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00241">piecewise_linear_function.cc:241</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a3e0673c584a9281683e7d137fe7476cb"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a3e0673c584a9281683e7d137fe7476cb">operations_research::PiecewiseSegment::slope</a></div><div class="ttdeci">int64_t slope() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00054">piecewise_linear_function.h:54</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a47a1fa2007b506d4ec34e2794ef5b1e1"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a47a1fa2007b506d4ec34e2794ef5b1e1">operations_research::PiecewiseSegment::start_y</a></div><div class="ttdeci">int64_t start_y() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00050">piecewise_linear_function.h:50</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a535295123475f146509112e5423154cc"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a535295123475f146509112e5423154cc">operations_research::PiecewiseSegment::PiecewiseSegment</a></div><div class="ttdeci">PiecewiseSegment(int64_t point_x, int64_t point_y, int64_t slope, int64_t other_point_x)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00077">piecewise_linear_function.cc:77</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a717f65b06206ba8cc7bbe1aa0c4a6c3b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a717f65b06206ba8cc7bbe1aa0c4a6c3b">operations_research::PiecewiseSegment::Value</a></div><div class="ttdeci">int64_t Value(int64_t x) const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00086">piecewise_linear_function.cc:86</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a764be64f3029f8b8e23511061d8de355"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a764be64f3029f8b8e23511061d8de355">operations_research::PiecewiseSegment::DebugString</a></div><div class="ttdeci">std::string DebugString() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00259">piecewise_linear_function.cc:259</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a77ce53a27b88c53f5fa438a08d00af34"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a77ce53a27b88c53f5fa438a08d00af34">operations_research::PiecewiseSegment::FindComparator</a></div><div class="ttdeci">static bool FindComparator(int64_t point, const PiecewiseSegment &amp;segment)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00232">piecewise_linear_function.cc:232</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a812c497c8e21c8b38593fc358c2ae6fd"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a812c497c8e21c8b38593fc358c2ae6fd">operations_research::PiecewiseSegment::end_x</a></div><div class="ttdeci">int64_t end_x() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00048">piecewise_linear_function.h:48</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a8829bfff4b5ca5e126ff3aa7e29e233c"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a8829bfff4b5ca5e126ff3aa7e29e233c">operations_research::PiecewiseSegment::ExpandEnd</a></div><div class="ttdeci">void ExpandEnd(int64_t end_x)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00237">piecewise_linear_function.cc:237</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_a8a76bb73d807580286eda7f04188553b"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#a8a76bb73d807580286eda7f04188553b">operations_research::PiecewiseSegment::AddConstantToY</a></div><div class="ttdeci">void AddConstantToY(int64_t constant)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00251">piecewise_linear_function.cc:251</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_aa5f57f858a4566fdb393f06840c52fc8"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#aa5f57f858a4566fdb393f06840c52fc8">operations_research::PiecewiseSegment::end_y</a></div><div class="ttdeci">int64_t end_y() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00052">piecewise_linear_function.h:52</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_aaae2d9393b903d8dea5e9afd1e49fae6"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#aaae2d9393b903d8dea5e9afd1e49fae6">operations_research::PiecewiseSegment::intersection_y</a></div><div class="ttdeci">int64_t intersection_y() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00056">piecewise_linear_function.h:56</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_afcfbd07e95226dfc2556b43e41fe4fae"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#afcfbd07e95226dfc2556b43e41fe4fae">operations_research::PiecewiseSegment::start_x</a></div><div class="ttdeci">int64_t start_x() const</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8h_source.html#l00046">piecewise_linear_function.h:46</a></div></div>
<div class="ttc" id="aclassoperations__research_1_1_piecewise_segment_html_afd287f1ff1de1124a2cd8a6fe79cb3fb"><div class="ttname"><a href="classoperations__research_1_1_piecewise_segment.html#afd287f1ff1de1124a2cd8a6fe79cb3fb">operations_research::PiecewiseSegment::SortComparator</a></div><div class="ttdeci">static bool SortComparator(const PiecewiseSegment &amp;segment1, const PiecewiseSegment &amp;segment2)</div><div class="ttdef"><b>Definition:</b> <a href="piecewise__linear__function_8cc_source.html#l00227">piecewise_linear_function.cc:227</a></div></div>
<div class="ttc" id="ademon__profiler_8cc_html_ac072af30c4ffbc834bb4c681f6ecb514"><div class="ttname"><a href="demon__profiler_8cc.html#ac072af30c4ffbc834bb4c681f6ecb514">value</a></div><div class="ttdeci">int64_t value</div><div class="ttdef"><b>Definition:</b> <a href="demon__profiler_8cc_source.html#l00044">demon_profiler.cc:44</a></div></div>
<div class="ttc" id="aintegral__types_8h_html"><div class="ttname"><a href="integral__types_8h.html">integral_types.h</a></div></div>
<div class="ttc" id="amacros_8h_html"><div class="ttname"><a href="macros_8h.html">macros.h</a></div></div>
<div class="ttc" id="anamespaceoperations__research_html"><div class="ttname"><a href="namespaceoperations__research.html">operations_research</a></div><div class="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><div class="ttdef"><b>Definition:</b> <a href="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<div class="ttc" id="asaturated__arithmetic_8h_html"><div class="ttname"><a href="saturated__arithmetic_8h.html">saturated_arithmetic.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_a3328a0ea67a2aaa160c2783ffbaa5dc.html">util</a></li><li class="navelem"><a class="el" href="piecewise__linear__function_8h.html">piecewise_linear_function.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>