📄 class_easylocal__runner.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"> </td>
<td>
<!-- Generated by Doxygen 1.2.5 on Sat Jun 9 18:59:32 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::Runner Class Template Reference</h1><code>#include <<a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>></code>
<p>
Inheritance diagram for easylocal::Runner<p><center><img src="class_easylocal__Runner_inherit_graph.gif" border="0" usemap="#easylocal::Runner_inherit_map" alt="Inheritance graph"></center>
<map name="easylocal::Runner_inherit_map">
<area href="class_easylocal__MoveRunner.html" shape="rect" coords="281,67,420,85">
<area href="class_easylocal__HillClimbing.html" shape="rect" coords="0,133,141,152">
<area href="class_easylocal__SimulatedAnnealing.html" shape="rect" coords="165,133,344,152">
<area href="class_easylocal__SteepestDescent.html" shape="rect" coords="368,133,525,152">
<area href="class_easylocal__TabuSearch.html" shape="rect" coords="549,133,683,152">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_easylocal__Runner-members.html">List of all members.</a><h2>Public Methods</h2>
<ul>
<li>virtual <a class="el" href="class_easylocal__Runner.html#a0">~Runner</a> ()
<li><a class="el" href="class_easylocal__Runner.html#a1">Runner</a> (std::string s="Runner <a class="el" href="class_easylocal__Runner.html#n0">name</a>", std::string t="Runner <a class="el" href="class_easylocal__Runner.html#n1">type</a>")
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a2">Go</a> ()=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a3">Step</a> (unsigned int n)=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a4">Print</a> (std::ostream &os=std::cout) const=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a5">SetCurrentState</a> (const State &st)=0
<li>virtual State <a class="el" href="class_easylocal__Runner.html#a6">GetCurrentState</a> ()=0
<li>virtual fvalue <a class="el" href="class_easylocal__Runner.html#a7">CurrentStateCost</a> ()=0
<li>virtual State <a class="el" href="class_easylocal__Runner.html#a8">GetBestState</a> ()=0
<li>virtual fvalue <a class="el" href="class_easylocal__Runner.html#a9">BestStateCost</a> ()=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a10">ComputeCost</a> ()=0
<li>virtual bool <a class="el" href="class_easylocal__Runner.html#a11">LowerBoundReached</a> ()=0
<li>virtual unsigned long <a class="el" href="class_easylocal__Runner.html#a12">NumberOfIterations</a> () const=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a13">ReadParameters</a> ()=0
<li>std::string <a class="el" href="class_easylocal__Runner.html#a14">Name</a> ()
<li>std::string <a class="el" href="class_easylocal__Runner.html#a15">Type</a> ()
<li>void <a class="el" href="class_easylocal__Runner.html#a16">SetName</a> (std::string s)
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a17">SetInput</a> (Input *in)=0
<li>virtual Input* <a class="el" href="class_easylocal__Runner.html#a18">GetInput</a> ()=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a19">Check</a> ()=0
<li>virtual void <a class="el" href="class_easylocal__Runner.html#a20">SetParameters</a> (const <a class="el" href="class_easylocal__ParameterBox.html">ParameterBox</a> &pb)=0
</ul>
<h2>Protected Attributes</h2>
<ul>
<li>std::string <a class="el" href="class_easylocal__Runner.html#n0">name</a>
<li>std::string <a class="el" href="class_easylocal__Runner.html#n1">type</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class Input, class State> class easylocal::Runner</h3>
This is the interface for an abstract runner. Each runner has many data objects for representing the state of the search (current state, best state, current move, number of iterations, ...), and it maintain links to all the helpers, which are invoked for performing specific tasks on its own data. Example of actual runners are tabu search and simulated annealing.
<p>
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00495">495</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
<a name="a0" doxytag="easylocal::Runner::~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 State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
easylocal::Runner<Input, State>::~Runner<Input, State> (
</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>
</td>
<td>
<p>
Virtual destructor.
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00499">499</a> of file <a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>. </td>
</tr>
</table>
<a name="a1" doxytag="easylocal::Runner::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 State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
easylocal::Runner< Input, State >::Runner<Input, State> (
</b></td>
<td valign="bottom"><b>
std::string <em>s</em> = "Runner<Input, State> <a class="el" href="class_easylocal__Runner.html#n0">name</a>",
</b></td>
</tr>
<tr>
<td></td>
<td><b>
std::string <em>t</em> = "Runner<Input, State> <a class="el" href="class_easylocal__Runner.html#n1">type</a>" )
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructs a runner and associates a name and a type to it.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>s</em>
</td><td>
the name of the runner </td></tr>
<tr><td valign=top><em>t</em>
</td><td>
the type of the runner (used for parameter setting) </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l00736">736</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="a9" doxytag="easylocal::Runner::BestStateCost"></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 State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
fvalue easylocal::Runner<Input, State>::BestStateCost (
</b></td>
<td valign="bottom"><b>
)<code> [pure virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Gets the cost of the best state found by the runner. <dl compact><dt>
<b>Returns: </b><dd>
the cost of the best state found by the runner </dl>
<p>
Reimplemented in <a class="el" href="class_easylocal__MoveRunner.html#a7">easylocal::MoveRunner</a>. </td>
</tr>
</table>
<a name="a19" doxytag="easylocal::Runner::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<class Input, class State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
void easylocal::Runner<Input, State>::Check (
</b></td>
<td valign="bottom"><b>
)<code> [pure virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Checks wether the object state is consistent with all the related objects.
<p>
Reimplemented in <a class="el" href="class_easylocal__MoveRunner.html#a18">easylocal::MoveRunner</a>. </td>
</tr>
</table>
<a name="a10" doxytag="easylocal::Runner::ComputeCost"></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 State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
void easylocal::Runner<Input, State>::ComputeCost (
</b></td>
<td valign="bottom"><b>
)<code> [pure virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Computes the cost of the current state.
<p>
Reimplemented in <a class="el" href="class_easylocal__MoveRunner.html#a8">easylocal::MoveRunner</a>. </td>
</tr>
</table>
<a name="a7" doxytag="easylocal::Runner::CurrentStateCost"></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 State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
fvalue easylocal::Runner<Input, State>::CurrentStateCost (
</b></td>
<td valign="bottom"><b>
)<code> [pure virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Gets the cost of the internal state of the runner. <dl compact><dt>
<b>Returns: </b><dd>
the cost of the current state of the runner </dl>
<p>
Reimplemented in <a class="el" href="class_easylocal__MoveRunner.html#a5">easylocal::MoveRunner</a>. </td>
</tr>
</table>
<a name="a8" doxytag="easylocal::Runner::GetBestState"></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 State> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
State easylocal::Runner<Input, State>::GetBestState (
</b></td>
<td valign="bottom"><b>
)<code> [pure virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -