📄 class_easylocal__hillclimbing.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:23 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::HillClimbing Class Template Reference</h1><code>#include <<a class="el" href="EasyLocal_h-source.html">EasyLocal.h</a>></code>
<p>
Inheritance diagram for easylocal::HillClimbing<p><center><img src="class_easylocal__HillClimbing_inherit_graph.gif" border="0" usemap="#easylocal::HillClimbing_inherit_map" alt="Inheritance graph"></center>
<map name="easylocal::HillClimbing_inherit_map">
<area href="class_easylocal__MoveRunner.html" shape="rect" coords="0,67,261,85">
<area href="class_easylocal__Runner.html" shape="rect" coords="35,0,227,19">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for easylocal::HillClimbing:<p><center><img src="class_easylocal__HillClimbing_coll_graph.gif" border="0" usemap="#easylocal::HillClimbing_coll_map" alt="Collaboration graph"></center>
<map name="easylocal::HillClimbing_coll_map">
<area href="class_easylocal__MoveRunner.html" shape="rect" coords="109,165,371,184">
<area href="class_easylocal__Runner.html" shape="rect" coords="0,82,192,101">
<area href="class_easylocal__StateManager.html" shape="rect" coords="127,0,353,18">
<area href="class_easylocal__NeighborhoodExplorer.html" shape="rect" coords="307,82,621,101">
<area href="class_easylocal__ProhibitionManager.html" shape="rect" coords="377,0,607,18">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_easylocal__HillClimbing-members.html">List of all members.</a><h2>Public Methods</h2>
<ul>
<li>void <a class="el" href="class_easylocal__HillClimbing.html#a0">Print</a> (std::ostream &os=std::cout) const
<li>void <a class="el" href="class_easylocal__HillClimbing.html#a1">ReadParameters</a> ()
</ul>
<h2>Protected Methods</h2>
<ul>
<li><a class="el" href="class_easylocal__HillClimbing.html#b0">HillClimbing</a> (<a class="el" href="class_easylocal__StateManager.html">StateManager</a>< Input, State > *s, <a class="el" href="class_easylocal__NeighborhoodExplorer.html">NeighborhoodExplorer</a>< Input, State, Move > *ne, Input *in=NULL)
<li>void <a class="el" href="class_easylocal__HillClimbing.html#b1">InitializeRun</a> ()
<li>void <a class="el" href="class_easylocal__HillClimbing.html#b2">TerminateRun</a> ()
<li>bool <a class="el" href="class_easylocal__HillClimbing.html#b3">StopCriterion</a> ()
<li>bool <a class="el" href="class_easylocal__HillClimbing.html#b4">AcceptableMove</a> ()
<li>void <a class="el" href="class_easylocal__HillClimbing.html#b5">StoreMove</a> ()
<li>void <a class="el" href="class_easylocal__HillClimbing.html#b6">SelectMove</a> ()
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class Input, class State, class Move> class easylocal::HillClimbing</h3>
The Hill Climbing runner considers random move selection. A move is then performed only if it does improve or it leaves unchanged the value of the cost function.
<p>
<p>
Definition at line <a class="el" href="EasyLocal_h-source.html#l00677">677</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::HillClimbing::HillClimbing"></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, class Move> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
easylocal::HillClimbing< Input, State, Move >::HillClimbing<Input, State, Move> (
</b></td>
<td valign="bottom"><b>
<a class="el" href="class_easylocal__StateManager.html">StateManager</a>< Input, State > * <em>s</em>,
</b></td>
</tr>
<tr>
<td></td>
<td><b>
<a class="el" href="class_easylocal__NeighborhoodExplorer.html">NeighborhoodExplorer</a>< Input, State, Move > * <em>ne</em>,
</b></td>
</tr>
<tr>
<td></td>
<td><b>
Input * <em>in</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 hill climbing runner by linking it to a state manager, a neighborhood explorer, and an input object.<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>s</em>
</td><td>
a pointer to a compatible state manager </td></tr>
<tr><td valign=top><em>ne</em>
</td><td>
a pointer to a compatible neighborhood explorer </td></tr>
<tr><td valign=top><em>in</em>
</td><td>
a poiter to an input object </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01092">1092</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="b4" doxytag="easylocal::HillClimbing::AcceptableMove"></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, class Move> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
bool easylocal::HillClimbing< Input, State, Move >::AcceptableMove (
</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>
A move is accepted if it is non worsening (i.e., it improves the cost or leaves it unchanged).
<p>
Reimplemented from <a class="el" href="class_easylocal__MoveRunner.html#b8">easylocal::MoveRunner</a>.
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01155">1155</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>. </td>
</tr>
</table>
<a name="b1" doxytag="easylocal::HillClimbing::InitializeRun"></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, class Move> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
void easylocal::HillClimbing< Input, State, Move >::InitializeRun (
</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>
The hill climbing initialization simply invokes the superclass companion method.
<p>
Reimplemented from <a class="el" href="class_easylocal__MoveRunner.html#b1">easylocal::MoveRunner</a>.
<p>
Definition at line <a class="el" href="EasyLocalTemplates_cpp-source.html#l01125">1125</a> of file <a class="el" href="EasyLocalTemplates_cpp-source.html">EasyLocalTemplates.cpp</a>. </td>
</tr>
</table>
<a name="a0" doxytag="easylocal::HillClimbing::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<class Input, class State, class Move> </b></td>
</tr>
<tr>
<td nowrap valign="top"><b>
void easylocal::HillClimbing< Input, State, Move >::Print (
</b></td>
<td valign="bottom"><b>
std::ostream & <em>os</em> = std::cout ) const<code> [virtual]</code>
</b></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -