class_easylocal__simplelocalsearch.html
来自「一个tabu search算法框架」· HTML 代码 · 共 380 行
HTML
380 行
<!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"> </td>
<td>
<!-- Generated by Doxygen 1.2.5 on Sat Jun 9 18:59:33 2001 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center>
<hr><h1>easylocal::SimpleLocalSearch Class Template Reference</h1><code>#include <<a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>></code>
<p>
Inheritance diagram for easylocal::SimpleLocalSearch<p><center><img src="class_easylocal__SimpleLocalSearch_inherit_graph.gif" border="0" usemap="#easylocal::SimpleLocalSearch_inherit_map" alt="Inheritance graph"></center>
<map name="easylocal::SimpleLocalSearch_inherit_map">
<area href="class_easylocal__LocalSearchSolver.html" shape="rect" coords="0,133,299,151">
<area href="class_easylocal__Solver.html" shape="rect" coords="51,66,248,85">
<area href="class_easylocal__AbstractSolver.html" shape="rect" coords="75,-1,224,18">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for easylocal::SimpleLocalSearch:<p><center><img src="class_easylocal__SimpleLocalSearch_coll_graph.gif" border="0" usemap="#easylocal::SimpleLocalSearch_coll_map" alt="Collaboration graph"></center>
<map name="easylocal::SimpleLocalSearch_coll_map">
<area href="class_easylocal__LocalSearchSolver.html" shape="rect" coords="96,165,395,183">
<area href="class_easylocal__Solver.html" shape="rect" coords="0,82,197,101">
<area href="class_easylocal__AbstractSolver.html" shape="rect" coords="24,-1,173,18">
<area href="class_easylocal__StateManager.html" shape="rect" coords="232,-1,459,18">
<area href="class_easylocal__OutputManager.html" shape="rect" coords="312,82,592,101">
<area href="class_easylocal__Runner.html" shape="rect" coords="419,165,611,183">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_easylocal__SimpleLocalSearch-members.html">List of all members.</a><h2>Public Methods</h2>
<ul>
<li>void <a class="el" href="class_easylocal__SimpleLocalSearch.html#a0">SetRunner</a> (<a class="el" href="class_easylocal__Runner.html">Runner</a>< Input, State > *r)
</ul>
<h2>Protected Methods</h2>
<ul>
<li><a class="el" href="class_easylocal__SimpleLocalSearch.html#b0">SimpleLocalSearch</a> (<a class="el" href="class_easylocal__StateManager.html">StateManager</a>< Input, State > *sm, <a class="el" href="class_easylocal__OutputManager.html">OutputManager</a>< Input, Output, State > *om, <a class="el" href="class_easylocal__Runner.html">Runner</a>< Input, State > *r, Input *in=NULL, Output *out=NULL)
<li><a class="el" href="class_easylocal__SimpleLocalSearch.html#b1">SimpleLocalSearch</a> (<a class="el" href="class_easylocal__StateManager.html">StateManager</a>< Input, State > *sm, <a class="el" href="class_easylocal__OutputManager.html">OutputManager</a>< Input, Output, State > *om, Input *in=NULL, Output *out=NULL)
<li>void <a class="el" href="class_easylocal__SimpleLocalSearch.html#b2">Run</a> ()
<li>unsigned long <a class="el" href="class_easylocal__SimpleLocalSearch.html#b3">NumberOfIterations</a> () const
</ul>
<h2>Protected Attributes</h2>
<ul>
<li><a class="el" href="class_easylocal__Runner.html">Runner</a><Input,State>* <a class="el" href="class_easylocal__SimpleLocalSearch.html#n0">p_runner</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class Input, class Output, class State> class easylocal::SimpleLocalSearch</h3>
The Simple Local Search solver handles a simple local search algorithm encapsulated in a runner.
<p>
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00867">867</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
<a name="b0" doxytag="easylocal::SimpleLocalSearch::SimpleLocalSearch"></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<class Input, class Output, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
easylocal::SimpleLocalSearch< Input, Output, State >::SimpleLocalSearch<Input, Output, State> (
</b></td>
<td valign="bottom"><b>
<a class="el" href="class_easylocal__StateManager.html">StateManager</a>< Input, State > * <em>sm</em>,
</b></td>
</tr>
<tr>
<td></td>
<td><b>
<a class="el" href="class_easylocal__OutputManager.html">OutputManager</a>< Input, Output, State > * <em>om</em>,
</b></td>
</tr>
<tr>
<td></td>
<td><b>
<a class="el" href="class_easylocal__Runner.html">Runner</a>< Input, State > * <em>r</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 )<code> [protected]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructs a simple local search solver by providing it links to a state manager, an output manager, a runner, 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>
</td><td>
a pointer to a compatible state manager </td></tr>
<tr><td valign=top><em>om</em>
</td><td>
a pointer to a compatible output manager </td></tr>
<tr><td valign=top><em>r</em>
</td><td>
a pointer to a compatible runner </td></tr>
<tr><td valign=top><em>in</em>
</td><td>
a pointer to an input object </td></tr>
<tr><td valign=top><em>out</em>
</td><td>
a pointer to an output object </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01711">1711</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>. </td>
</tr>
</table>
<a name="b1" doxytag="easylocal::SimpleLocalSearch::SimpleLocalSearch"></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<class Input, class Output, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
easylocal::SimpleLocalSearch< Input, Output, State >::SimpleLocalSearch<Input, Output, State> (
</b></td>
<td valign="bottom"><b>
<a class="el" href="class_easylocal__StateManager.html">StateManager</a>< Input, State > * <em>sm</em>,
</b></td>
</tr>
<tr>
<td></td>
<td><b>
<a class="el" href="class_easylocal__OutputManager.html">OutputManager</a>< Input, Output, State > * <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 )<code> [protected]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructs a simple local search 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>
</td><td>
a pointer to a compatible state manager </td></tr>
<tr><td valign=top><em>om</em>
</td><td>
a pointer to a compatible output manager </td></tr>
<tr><td valign=top><em>in</em>
</td><td>
a pointer to an input object </td></tr>
<tr><td valign=top><em>out</em>
</td><td>
a pointer to an output object </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01726">1726</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="b3" doxytag="easylocal::SimpleLocalSearch::NumberOfIterations"></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<class Input, class Output, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
unsigned long easylocal::SimpleLocalSearch< Input, Output, State >::NumberOfIterations (
</b></td>
<td valign="bottom"><b>
) const<code> [protected, virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Returns the number of iterations performed by the attached runner.
<p>
<dl compact><dt>
<b>Returns: </b><dd>
the number of iterations elapsed. </dl>
<p>
Reimplemented from <a class="el" href="class_easylocal__LocalSearchSolver.html#b2">easylocal::LocalSearchSolver</a>.
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01737">1737</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>. </td>
</tr>
</table>
<a name="b2" doxytag="easylocal::SimpleLocalSearch::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<class Input, class Output, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
void easylocal::SimpleLocalSearch< Input, Output, State >::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>
</td>
<td>
<p>
Lets the runner Go, and then collects the best state found.
<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#l01744">1744</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>. </td>
</tr>
</table>
<a name="a0" doxytag="easylocal::SimpleLocalSearch::SetRunner"></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<class Input, class Output, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
void easylocal::SimpleLocalSearch< Input, Output, State >::SetRunner (
</b></td>
<td valign="bottom"><b>
<a class="el" href="class_easylocal__Runner.html">Runner</a>< Input, State > * <em>r</em> )
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the runner employed for solving the problem to the one passed as parameter.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>r</em>
</td><td>
the new runner to be used </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01695">1695</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::SimpleLocalSearch::p_runner"></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<class Input, class Output, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
<a class="el" href="class_easylocal__Runner.html">Runner</a>< Input, State > * easylocal::SimpleLocalSearch<Input, Output, State>::p_runner<code> [protected]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
A pointer to the managed runner.
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00879">879</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> </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 + =
减小字号Ctrl + -
显示快捷键?