Files
ortools-clone/docs/cpp_routing/classoperations__research_1_1IntVarIterator.html
Corentin Le Molgat 56440d30e5 Update docs to v7.5
2020-01-27 13:48:26 +01:00

260 lines
13 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.18 -->
<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_1IntVarIterator.html">IntVarIterator</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classoperations__research_1_1IntVarIterator-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">IntVarIterator<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The class Iterator has two direct subclasses. </p>
<p>HoleIterators iterates over all holes, that is value removed between the current min and max of the variable since the last time the variable was processed in the queue. DomainIterators iterates over all elements of the variable domain. Both iterators are not robust to domain changes. Hole iterators can also report values outside the current min and max of the variable. HoleIterators should only be called from a demon attached to the variable that has created this iterator. IntVar* current_var; std::unique_ptr&lt;IntVarIterator&gt; it(current_var-&gt;MakeHoleIterator(false)); for (const int64 hole : InitAndGetValues(it)) { /// use the hole } </p>
<p class="definition">Definition at line <a class="el" href="constraint__solver_8h_source.html#l03866">3866</a> of file <a class="el" href="constraint__solver_8h_source.html">constraint_solver.h</a>.</p>
</div><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:ad58ad3bd33c8c89814ca3675c414406d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1IntVarIterator.html#ad58ad3bd33c8c89814ca3675c414406d">~IntVarIterator</a> () override</td></tr>
<tr class="separator:ad58ad3bd33c8c89814ca3675c414406d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5368a4a3fff770682cf257e81707d9f0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1IntVarIterator.html#a5368a4a3fff770682cf257e81707d9f0">Init</a> ()=0</td></tr>
<tr class="memdesc:a5368a4a3fff770682cf257e81707d9f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method must be called before each loop. <a href="classoperations__research_1_1IntVarIterator.html#a5368a4a3fff770682cf257e81707d9f0">More...</a><br /></td></tr>
<tr class="separator:a5368a4a3fff770682cf257e81707d9f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd583d1de9a76003cabb79710d08e1b5"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1IntVarIterator.html#afd583d1de9a76003cabb79710d08e1b5">Ok</a> () const =0</td></tr>
<tr class="memdesc:afd583d1de9a76003cabb79710d08e1b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method indicates if we can call <a class="el" href="classoperations__research_1_1IntVarIterator.html#ac067bc2252cc65b1eb004d5285e5fdb2" title="This method returns the current value of the iterator.">Value()</a> or not. <a href="classoperations__research_1_1IntVarIterator.html#afd583d1de9a76003cabb79710d08e1b5">More...</a><br /></td></tr>
<tr class="separator:afd583d1de9a76003cabb79710d08e1b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac067bc2252cc65b1eb004d5285e5fdb2"><td class="memItemLeft" align="right" valign="top">virtual int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1IntVarIterator.html#ac067bc2252cc65b1eb004d5285e5fdb2">Value</a> () const =0</td></tr>
<tr class="memdesc:ac067bc2252cc65b1eb004d5285e5fdb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the current value of the iterator. <a href="classoperations__research_1_1IntVarIterator.html#ac067bc2252cc65b1eb004d5285e5fdb2">More...</a><br /></td></tr>
<tr class="separator:ac067bc2252cc65b1eb004d5285e5fdb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e6ce1b8883cf6764780b7108dbb8495"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1IntVarIterator.html#a5e6ce1b8883cf6764780b7108dbb8495">Next</a> ()=0</td></tr>
<tr class="memdesc:a5e6ce1b8883cf6764780b7108dbb8495"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method moves the iterator to the next value. <a href="classoperations__research_1_1IntVarIterator.html#a5e6ce1b8883cf6764780b7108dbb8495">More...</a><br /></td></tr>
<tr class="separator:a5e6ce1b8883cf6764780b7108dbb8495"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed804747c45a7e1caf81461f9e45dd91"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classoperations__research_1_1IntVarIterator.html#aed804747c45a7e1caf81461f9e45dd91">DebugString</a> () const override</td></tr>
<tr class="memdesc:aed804747c45a7e1caf81461f9e45dd91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pretty Print. <a href="classoperations__research_1_1IntVarIterator.html#aed804747c45a7e1caf81461f9e45dd91">More...</a><br /></td></tr>
<tr class="separator:aed804747c45a7e1caf81461f9e45dd91"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad58ad3bd33c8c89814ca3675c414406d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad58ad3bd33c8c89814ca3675c414406d">&#9670;&nbsp;</a></span>~IntVarIterator()</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_1IntVarIterator.html">IntVarIterator</a> </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 class="mlabel">override</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="constraint__solver_8h_source.html#l03868">3868</a> of file <a class="el" href="constraint__solver_8h_source.html">constraint_solver.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aed804747c45a7e1caf81461f9e45dd91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed804747c45a7e1caf81461f9e45dd91">&#9670;&nbsp;</a></span>DebugString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::string DebugString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Pretty Print. </p>
<p>Reimplemented from <a class="el" href="classoperations__research_1_1BaseObject.html#a8eba5d533fa9df4617c1868d3ec2afc4">BaseObject</a>.</p>
<p class="definition">Definition at line <a class="el" href="constraint__solver_8h_source.html#l03883">3883</a> of file <a class="el" href="constraint__solver_8h_source.html">constraint_solver.h</a>.</p>
</div>
</div>
<a id="a5368a4a3fff770682cf257e81707d9f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5368a4a3fff770682cf257e81707d9f0">&#9670;&nbsp;</a></span>Init()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void Init </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method must be called before each loop. </p>
</div>
</div>
<a id="a5e6ce1b8883cf6764780b7108dbb8495"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e6ce1b8883cf6764780b7108dbb8495">&#9670;&nbsp;</a></span>Next()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void Next </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method moves the iterator to the next value. </p>
</div>
</div>
<a id="afd583d1de9a76003cabb79710d08e1b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd583d1de9a76003cabb79710d08e1b5">&#9670;&nbsp;</a></span>Ok()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool Ok </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method indicates if we can call <a class="el" href="classoperations__research_1_1IntVarIterator.html#ac067bc2252cc65b1eb004d5285e5fdb2" title="This method returns the current value of the iterator.">Value()</a> or not. </p>
</div>
</div>
<a id="ac067bc2252cc65b1eb004d5285e5fdb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac067bc2252cc65b1eb004d5285e5fdb2">&#9670;&nbsp;</a></span>Value()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual int64 Value </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method returns the current value of the iterator. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="constraint__solver_8h_source.html">constraint_solver.h</a></li>
</ul>
</div><!-- contents -->
</div>
</div>
<div id="footer-container">
<div id="footer">
</div>
</div>
</body>
</html>