273 lines
14 KiB
HTML
273 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>OR-Tools</title>
|
|
<meta http-equiv="Content-Type" content="text/html;"/>
|
|
<meta charset="utf-8"/>
|
|
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
|
<link rel="stylesheet" type="text/css" href="ortools.css" title="default" media="screen,print" />
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">Google OR-Tools 7.5</span>
|
|
</div>
|
|
</div>
|
|
<div id="content" style="width: 100%; overflow: hidden;">
|
|
<div style="margin-left: 15px; margin-top: 5px; float: left; color: #145A32;">
|
|
<h2>C++ Reference</h2>
|
|
<ul>
|
|
<li><a href="../cpp_algorithms/annotated.html">Algorithms</a></li>
|
|
<li><a href="../cpp_sat/annotated.html">CP-SAT</a></li>
|
|
<li><a href="../cpp_graph/annotated.html">Graph</a></li>
|
|
<li><a href="../cpp_routing/annotated.html">Routing</a></li>
|
|
<li><a href="../cpp_linear/annotated.html">Linear solver</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<div align="center">
|
|
<h1 style="color: #145A32;">C++ Reference: Routing</h1>
|
|
</div>
|
|
<!-- Generated by Doxygen 1.8.16 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespaceoperations__research.html">operations_research</a></li><li class="navelem"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classoperations__research_1_1SimpleBoundCosts-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">SimpleBoundCosts</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>A structure meant to store soft bounds and associated violation constants. </p>
|
|
<p>It is 'Simple' because it has one <a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a> per element, in contrast to 'Multiple'. Design notes:</p><ul>
|
|
<li>it is meant to store model information to be shared through pointers, so it disallows copy and assign to avoid accidental duplication.</li>
|
|
<li>it keeps soft bounds as an array of structs to help cache, because code that uses such bounds typically use both bound and cost.</li>
|
|
<li>soft bounds are named pairs, prevents some mistakes.</li>
|
|
<li>using operator[] to access elements is not interesting, because the structure will be accessed through pointers, moreover having to type bound_cost reminds the user of the order if they do a copy assignment of the element. </li>
|
|
</ul>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="routing_8h_source.html#l02121">2121</a> of file <a class="el" href="routing_8h_source.html">routing.h</a>.</p>
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a2d9c0c0c671bb710c0f268fef402b698"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html#a2d9c0c0c671bb710c0f268fef402b698">SimpleBoundCosts</a> (int num_bounds, <a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a> default_bound_cost)</td></tr>
|
|
<tr class="separator:a2d9c0c0c671bb710c0f268fef402b698"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a19e1b2057c4fd91aab838ee1c159da8b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html#a19e1b2057c4fd91aab838ee1c159da8b">bound_cost</a> (int element)</td></tr>
|
|
<tr class="separator:a19e1b2057c4fd91aab838ee1c159da8b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aaf6c218cbb9459db5d7e9318e5667e66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html#aaf6c218cbb9459db5d7e9318e5667e66">bound_cost</a> (int element) const</td></tr>
|
|
<tr class="separator:aaf6c218cbb9459db5d7e9318e5667e66"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af40990b9bd3d70d30e8ce7cdda1ad56f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html#af40990b9bd3d70d30e8ce7cdda1ad56f">Size</a> ()</td></tr>
|
|
<tr class="separator:af40990b9bd3d70d30e8ce7cdda1ad56f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae267a319d38d3f1d6beb6cb605e70daa"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html#ae267a319d38d3f1d6beb6cb605e70daa">SimpleBoundCosts</a> (const <a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> &)=delete</td></tr>
|
|
<tr class="separator:ae267a319d38d3f1d6beb6cb605e70daa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af2133502882dec3ada4aa271a92bffe6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html#af2133502882dec3ada4aa271a92bffe6">operator=</a> (const <a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> &)=delete</td></tr>
|
|
<tr class="separator:af2133502882dec3ada4aa271a92bffe6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a2d9c0c0c671bb710c0f268fef402b698"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2d9c0c0c671bb710c0f268fef402b698">◆ </a></span>SimpleBoundCosts() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>num_bounds</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a> </td>
|
|
<td class="paramname"><em>default_bound_cost</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="routing_8h_source.html#l02127">2127</a> of file <a class="el" href="routing_8h_source.html">routing.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae267a319d38d3f1d6beb6cb605e70daa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae267a319d38d3f1d6beb6cb605e70daa">◆ </a></span>SimpleBoundCosts() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> & </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a19e1b2057c4fd91aab838ee1c159da8b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a19e1b2057c4fd91aab838ee1c159da8b">◆ </a></span>bound_cost() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a>& bound_cost </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>element</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="routing_8h_source.html#l02129">2129</a> of file <a class="el" href="routing_8h_source.html">routing.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aaf6c218cbb9459db5d7e9318e5667e66"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aaf6c218cbb9459db5d7e9318e5667e66">◆ </a></span>bound_cost() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="structoperations__research_1_1SimpleBoundCosts_1_1BoundCost.html">BoundCost</a> bound_cost </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>element</em></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="routing_8h_source.html#l02130">2130</a> of file <a class="el" href="routing_8h_source.html">routing.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af2133502882dec3ada4aa271a92bffe6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af2133502882dec3ada4aa271a92bffe6">◆ </a></span>operator=()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> operator= </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classoperations__research_1_1SimpleBoundCosts.html">SimpleBoundCosts</a> & </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af40990b9bd3d70d30e8ce7cdda1ad56f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af40990b9bd3d70d30e8ce7cdda1ad56f">◆ </a></span>Size()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int Size </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="routing_8h_source.html#l02131">2131</a> of file <a class="el" href="routing_8h_source.html">routing.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="routing_8h_source.html">routing.h</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div>
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|