⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_easylocal__tokenringsolver.html

📁 一个tabu search算法框架
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>EasyLocal++ Documentation</title>
  <link href="local.css" rel="stylesheet" type="text/css">
</head>

<body lang="en">

<table width="100%" border="0">
  <tbody>
    <tr>
      <td colspan="2"><h1 class="nojustify">EasyLocal++ Documentation</h1>
        <hr>
      </td>
    </tr>
    <tr>
      <td width="30" align="center">&nbsp;</td>
      <td>
<!-- Generated by Doxygen 1.2.5 on Sat Jun 9 18:59:41 2001 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>easylocal::TokenRingSolver  Class Template Reference</h1><code>#include &lt;<a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>&gt;</code>
<p>
Inheritance diagram for easylocal::TokenRingSolver<p><center><img src="class_easylocal__TokenRingSolver_inherit_graph.gif" border="0" usemap="#easylocal::TokenRingSolver_inherit_map" alt="Inheritance graph"></center>
<map name="easylocal::TokenRingSolver_inherit_map">
<area href="class_easylocal__MultiRunnerSolver.html" shape="rect" coords="0,200,301,218">
<area href="class_easylocal__LocalSearchSolver.html" shape="rect" coords="1,133,300,152">
<area href="class_easylocal__Solver.html" shape="rect" coords="52,66,249,85">
<area href="class_easylocal__AbstractSolver.html" shape="rect" coords="76,0,225,18">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for easylocal::TokenRingSolver:<p><center><img src="class_easylocal__TokenRingSolver_coll_graph.gif" border="0" usemap="#easylocal::TokenRingSolver_coll_map" alt="Collaboration graph"></center>
<map name="easylocal::TokenRingSolver_coll_map">
<area href="class_easylocal__MultiRunnerSolver.html" shape="rect" coords="296,248,597,267">
<area href="class_easylocal__LocalSearchSolver.html" shape="rect" coords="96,165,395,184">
<area href="class_easylocal__Solver.html" shape="rect" coords="0,83,197,101">
<area href="class_easylocal__AbstractSolver.html" shape="rect" coords="24,0,173,19">
<area href="class_easylocal__StateManager.html" shape="rect" coords="232,0,459,19">
<area href="class_easylocal__OutputManager.html" shape="rect" coords="312,83,592,101">
<area href="class_easylocal__Runner.html" shape="rect" coords="419,165,611,184">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_easylocal__TokenRingSolver-members.html">List of all members.</a><h2>Public Methods</h2>
<ul>
<li>void <a class="el" href="class_easylocal__TokenRingSolver.html#a0">SetRounds</a> (unsigned int r)
<li>void <a class="el" href="class_easylocal__TokenRingSolver.html#a1">SetStartRunner</a> (unsigned int sr)
<li>void <a class="el" href="class_easylocal__TokenRingSolver.html#a2">Check</a> ()
<li>void <a class="el" href="class_easylocal__TokenRingSolver.html#a3">Print</a> (std::ostream &amp;os=std::cout) const
</ul>
<h2>Protected Methods</h2>
<ul>
<li><a class="el" href="class_easylocal__TokenRingSolver.html#b0">TokenRingSolver</a> (<a class="el" href="class_easylocal__StateManager.html">StateManager</a>&lt; Input, State &gt; *sm, <a class="el" href="class_easylocal__OutputManager.html">OutputManager</a>&lt; Input, Output, State &gt; *om, Input *in=NULL, Output *out=NULL)
<li>void <a class="el" href="class_easylocal__TokenRingSolver.html#b1">Run</a> ()
</ul>
<h2>Protected Attributes</h2>
<ul>
<li>int <a class="el" href="class_easylocal__TokenRingSolver.html#n0">max_idle_rounds</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class Input, class Output, class State&gt;  class easylocal::TokenRingSolver</h3>

The Token-ring <a class="el" href="class_easylocal__Solver.html">Solver</a> alternates n runners for a number of rounds. 
<p>

<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00936">936</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="b0" doxytag="easylocal::TokenRingSolver::TokenRingSolver"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
easylocal::TokenRingSolver&lt; Input, Output, State &gt;::TokenRingSolver&lt;Input, Output, State&gt; (
          </b></td>
          <td valign="bottom"><b>
<a class="el" href="class_easylocal__StateManager.html">StateManager</a>&lt; Input, State &gt; * <em>sm</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
<a class="el" href="class_easylocal__OutputManager.html">OutputManager</a>&lt; Input, Output, State &gt; * <em>om</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
Input * <em>in</em> = NULL, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
Output * <em>out</em> = NULL&nbsp;)<code> [protected]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructs a token-ring runner solver by providing it links to a state manager, an output manager, an input, and an output object.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>sm</em>
&nbsp;</td><td>
 a pointer to a compatible state manager </td></tr>
<tr><td valign=top><em>om</em>
&nbsp;</td><td>
 a pointer to a compatible output manager </td></tr>
<tr><td valign=top><em>in</em>
&nbsp;</td><td>
 a pointer to an input object </td></tr>
<tr><td valign=top><em>out</em>
&nbsp;</td><td>
 a pointer to an output object </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01913">1913</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a2" doxytag="easylocal::TokenRingSolver::Check"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
void easylocal::TokenRingSolver&lt; Input, Output, State &gt;::Check (
          </b></td>
          <td valign="bottom"><b>
)<code> [virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Checks wether the object state is consistent with all the related objects. 
<p>
Reimplemented from <a class="el" href="class_easylocal__LocalSearchSolver.html#a5">easylocal::LocalSearchSolver</a>.
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01923">1923</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="easylocal::TokenRingSolver::Print"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
void easylocal::TokenRingSolver&lt; Input, Output, State &gt;::Print (
          </b></td>
          <td valign="bottom"><b>
std::ostream &amp; <em>os</em> = std::cout&nbsp;) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Outputs the solver state on a given output stream.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>os</em>
&nbsp;</td><td>
 the output stream </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01939">1939</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="b1" doxytag="easylocal::TokenRingSolver::Run"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
void easylocal::TokenRingSolver&lt; Input, Output, State &gt;::Run (
          </b></td>
          <td valign="bottom"><b>
)<code> [protected, virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Runs all the managed runners one after another till no improvement has produced in a given number of rounds 
<p>
Reimplemented from <a class="el" href="class_easylocal__LocalSearchSolver.html#b1">easylocal::LocalSearchSolver</a>.
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01954">1954</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="a0" doxytag="easylocal::TokenRingSolver::SetRounds"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
void easylocal::TokenRingSolver&lt; Input, Output, State &gt;::SetRounds (
          </b></td>
          <td valign="bottom"><b>
unsigned int <em>r</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the number of rounds to the given value.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>r</em>
&nbsp;</td><td>
 the number of rounds. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01890">1890</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="a1" doxytag="easylocal::TokenRingSolver::SetStartRunner"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
void easylocal::TokenRingSolver&lt; Input, Output, State &gt;::SetStartRunner (
          </b></td>
          <td valign="bottom"><b>
unsigned int <em>i</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Starts the token-ring from the i-th runner.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>i</em>
&nbsp;</td><td>
 the runner which to start form </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01899">1899</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="n0" doxytag="easylocal::TokenRingSolver::max_idle_rounds"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td colspan="2"><b>
template&lt;class Input, class Output, class State&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
int easylocal::TokenRingSolver&lt;Input, Output, State&gt;::max_idle_rounds<code> [protected]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maximum number of runs without improvement  allowed. 
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00947">947</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a><li><a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a></ul>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><hr>
        <span class="mark">Go to:</span> the <a href="index.html">Main Page</a> of the documentation.
      </td>
    </tr>
  </tbody>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -