class_easylocal__neighborhoodexplorer.html

来自「一个tabu search算法框架」· HTML 代码 · 共 1,464 行 · 第 1/4 页

HTML
1,464
字号
<!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:29 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::NeighborhoodExplorer  Class Template Reference</h1><code>#include &lt;<a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>&gt;</code>
<p>
Collaboration diagram for easylocal::NeighborhoodExplorer:<p><center><img src="class_easylocal__NeighborhoodExplorer_coll_graph.gif" border="0" usemap="#easylocal::NeighborhoodExplorer_coll_map" alt="Collaboration graph"></center>
<map name="easylocal::NeighborhoodExplorer_coll_map">
<area href="class_easylocal__ProhibitionManager.html" shape="rect" coords="0,0,229,18">
<area href="class_easylocal__StateManager.html" shape="rect" coords="253,0,480,18">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_easylocal__NeighborhoodExplorer-members.html">List of all members.</a><h2>Public Methods</h2>
<ul>
<li>virtual <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a0">~NeighborhoodExplorer</a> ()
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a1">FirstMove</a> (const State &amp;st, Move &amp;mv)
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a2">NextMove</a> (const State &amp;st, Move &amp;mv)=0
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a3">RandomMove</a> (const State &amp;st, Move &amp;mv)=0
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a4">BestMove</a> (const State &amp;st, Move &amp;mv)
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a5">SampleMove</a> (const State &amp;st, Move &amp;mv, int samples)
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a6">BestNonProhibitedMove</a> (const State &amp;st, Move &amp;mv, fvalue curr, fvalue best)
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a7">SampleNonProhibitedMove</a> (const State &amp;st, Move &amp;mv, int samples, fvalue curr, fvalue best)
<li>virtual bool <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a8">LastMoveDone</a> (const Move &amp;mv)
<li>virtual bool <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a9">FeasibleMove</a> (const State &amp;st, const Move mv)
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a10">SetProhibitionManager</a> (<a class="el" href="class_easylocal__ProhibitionManager.html">ProhibitionManager</a>&lt; Move &gt; *pm)
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a11">MakeMove</a> (State &amp;st, const Move &amp;mv)=0
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a12">DeltaCostFunction</a> (const State &amp;st, const Move &amp;mv)
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a13">NeighborhoodStatistics</a> (const State &amp;st)
<li>void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a14">PrintMoveInfo</a> (const State &amp;st, const Move &amp;mv, std::ostream &amp;os=std::cout)
<li>virtual void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a15">InputMove</a> (const State &amp;st, Move &amp;mv, std::istream &amp;is=std::cin) const
<li>void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a16">SetInput</a> (Input *in)
<li>Input* <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a17">GetInput</a> ()
<li>void <a class="el" href="class_easylocal__NeighborhoodExplorer.html#a18">Check</a> ()
</ul>
<h2>Protected Methods</h2>
<ul>
<li><a class="el" href="class_easylocal__NeighborhoodExplorer.html#b0">NeighborhoodExplorer</a> (<a class="el" href="class_easylocal__StateManager.html">StateManager</a>&lt; Input, State &gt; *sm, Input *in=NULL)
<li><a class="el" href="class_easylocal__NeighborhoodExplorer.html#b1">NeighborhoodExplorer</a> (<a class="el" href="class_easylocal__StateManager.html">StateManager</a>&lt; Input, State &gt; *sm, <a class="el" href="class_easylocal__ProhibitionManager.html">ProhibitionManager</a>&lt; Move &gt; *pm, Input *in=NULL)
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#b2">DeltaObjective</a> (const State &amp;st, const Move &amp;mv)
<li>virtual fvalue <a class="el" href="class_easylocal__NeighborhoodExplorer.html#b3">DeltaViolations</a> (const State &amp;st, const Move &amp;mv)
</ul>
<h2>Protected Attributes</h2>
<ul>
<li><a class="el" href="class_easylocal__StateManager.html">StateManager</a>&lt;Input,State&gt;* <a class="el" href="class_easylocal__NeighborhoodExplorer.html#n0">p_sm</a>
<li>Input* <a class="el" href="class_easylocal__NeighborhoodExplorer.html#n1">p_in</a>
<li>Move <a class="el" href="class_easylocal__NeighborhoodExplorer.html#n2">best_move</a>
<li>Move <a class="el" href="class_easylocal__NeighborhoodExplorer.html#n3">start_move</a>
<li><a class="el" href="class_easylocal__ProhibitionManager.html">ProhibitionManager</a>&lt;Move&gt;* <a class="el" href="class_easylocal__NeighborhoodExplorer.html#n4">p_pm</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class Input, class State, class Move&gt;  class easylocal::NeighborhoodExplorer</h3>

The Neighborhood Explorer is responsible for the strategy exploited in the exploration of the neighborhood, and for  computing the variations of the cost function due to a specific <code>Move</code>. 
<p>

<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00332">332</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="easylocal::NeighborhoodExplorer::~NeighborhoodExplorer"></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 State, class Move&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
easylocal::NeighborhoodExplorer&lt;Input, State, Move&gt;::~NeighborhoodExplorer&lt;Input, State, Move&gt; (
          </b></td>
          <td valign="bottom"><b>
)<code> [inline, virtual]</code>
          </b></td>
        </tr>

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

<p>
Virtual destructor. 
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00336">336</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>.    </td>
  </tr>
</table>
<a name="b0" doxytag="easylocal::NeighborhoodExplorer::NeighborhoodExplorer"></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 State, class Move&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
easylocal::NeighborhoodExplorer&lt; Input, State, Move &gt;::NeighborhoodExplorer&lt;Input, State, Move&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>
Input * <em>in</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 neighborhood explorer passing a pointer to a state manager  and a pointer to the input.<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>in</em>
&nbsp;</td><td>
 a pointer to an input object </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l00375">375</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="b1" doxytag="easylocal::NeighborhoodExplorer::NeighborhoodExplorer"></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 State, class Move&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
easylocal::NeighborhoodExplorer&lt; Input, State, Move &gt;::NeighborhoodExplorer&lt;Input, State, Move&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__ProhibitionManager.html">ProhibitionManager</a>&lt; Move &gt; * <em>pm</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
Input * <em>in</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 neighborhood explorer which has a prohibition manager too. It accepts a pointer to a state manager, a pointer to the prohibition manager, and a pointer to the input.<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>pm</em>
&nbsp;</td><td>
 a pointer to a compatible prohibition manager </td></tr>
<tr><td valign=top><em>in</em>
&nbsp;</td><td>
 a pointer to an input object </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l00389">389</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="a4" doxytag="easylocal::NeighborhoodExplorer::BestMove"></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 State, class Move&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
fvalue easylocal::NeighborhoodExplorer&lt; Input, State, Move &gt;::BestMove (
          </b></td>
          <td valign="bottom"><b>
const State &amp; <em>st</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
Move &amp; <em>mv</em>&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
Looks for the best move in the exploration of the neighborhood of a given  state. (i.e., the one that gives the best improvement in the cost  function).<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>st</em>
&nbsp;</td><td>
 the state </td></tr>
<tr><td valign=top><em>mv</em>
&nbsp;</td><td>
 the best move in the state st </td></tr>
</table>
</dl><dl compact><dt>
<b>Returns: </b><dd>
 the cost of move mv </dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l00427">427</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="a6" doxytag="easylocal::NeighborhoodExplorer::BestNonProhibitedMove"></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 State, class Move&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
fvalue easylocal::NeighborhoodExplorer&lt; Input, State, Move &gt;::BestNonProhibitedMove (
          </b></td>
          <td valign="bottom"><b>
const State &amp; <em>st</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
Move &amp; <em>mv</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
fvalue <em>curr</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
fvalue <em>best</em>&nbsp;)<code> [virtual]</code>
          </b></td>
        </tr>

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

<p>
Looks for the best move in a given state that is non prohibited.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>st</em>
&nbsp;</td><td>
 the state </td></tr>
<tr><td valign=top><em>mv</em>
&nbsp;</td><td>
 the best non prohibited move in st </td></tr>
<tr><td valign=top><em>curr</em>
&nbsp;</td><td>
 the cost of the state st </td></tr>
<tr><td valign=top><em>best</em>
&nbsp;</td><td>
 the cost of the best state found so far </td></tr>
</table>
</dl><dl compact><dt>
<b>Returns: </b><dd>
 the cost of the move mv </dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l00547">547</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>.    </td>
  </tr>
</table>
<a name="a18" doxytag="easylocal::NeighborhoodExplorer::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 State, class Move&gt;           </b></td>
        </tr>
        <tr>
          <td nowrap valign="top"><b> 
void easylocal::NeighborhoodExplorer&lt; Input, State, Move &gt;::Check (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

      </table>

⌨️ 快捷键说明

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