Česky
Kamil Dudka

Fast SAT Solver (C++, GAlib)

File detail

Name:DownloadSatSolverObserver_8h-source.html [Download]
Location: fss > doc > api > html
Size:12.7 KB
Last modification:2022-09-09 13:06

Source code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Fast SAT Solver: SatSolverObserver.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
  </ul>
</div>
<h1>SatSolverObserver.h</h1><a href="SatSolverObserver_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2008 Kamil Dudka &lt;xdudka00@stud.fit.vutbr.cz&gt;</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This file is part of fss (Fast SAT Solver).</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * fss is free software: you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment"> * any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * fss is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with fss.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef SATSOLVEROBSERVER_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define SATSOLVEROBSERVER_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="SatSolver_8h.html" title="ISatItem, IObserver and AbstractSatSolver with its base classes.">SatSolver.h</a>"</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">namespace </span>FastSatSolver {
<a name="l00036"></a>00036 
<a name="l00041"></a><a class="code" href="classFastSatSolver_1_1TimedStop.html">00041</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1TimedStop.html" title="Observer which stops process after specified time.">TimedStop</a>: <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IObserver.html" title="Simple observer&amp;#39;s base class.">IObserver</a> {
<a name="l00042"></a>00042     <span class="keyword">public</span>:
<a name="l00047"></a>00047       <a class="code" href="classFastSatSolver_1_1TimedStop.html#5d6de079315b84063c4deec32eef6013">TimedStop</a>(<a class="code" href="classFastSatSolver_1_1AbstractProcessWatched.html" title="Multi-step process with time-watch extension.">AbstractProcessWatched</a> *process, <span class="keywordtype">long</span> msec);
<a name="l00048"></a>00048       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1TimedStop.html#ba52ba759531af1cb8143ab87b52ddb0">~TimedStop</a>();
<a name="l00049"></a>00049       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFastSatSolver_1_1TimedStop.html#7ff19734eb024bd6f3e2ad95647b1b27" title="Event notification, usually called by object implementing ISubject interface.">notify</a>();
<a name="l00050"></a>00050     <span class="keyword">private</span>:
<a name="l00051"></a>00051       <span class="keyword">struct </span><a class="code" href="structFastSatSolver_1_1TimedStop_1_1Private.html">Private</a>;
<a name="l00052"></a>00052       <a class="code" href="structFastSatSolver_1_1TimedStop_1_1Private.html">Private</a> *d;
<a name="l00053"></a>00053   };
<a name="l00054"></a>00054 
<a name="l00059"></a><a class="code" href="classFastSatSolver_1_1ProgressWatch.html">00059</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1ProgressWatch.html" title="Observer which write out progress percentage when it is changed.">ProgressWatch</a>: <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IObserver.html" title="Simple observer&amp;#39;s base class.">IObserver</a> {
<a name="l00060"></a>00060     <span class="keyword">public</span>:
<a name="l00066"></a>00066       <a class="code" href="classFastSatSolver_1_1ProgressWatch.html#41ab01b3b0a796939656e0a7f58a9895">ProgressWatch</a>(
<a name="l00067"></a>00067                     <a class="code" href="classFastSatSolver_1_1AbstractProcess.html" title="Base class of simple multi-step process.">AbstractProcess</a>   *process,
<a name="l00068"></a>00068                     <span class="keywordtype">int</span>               stepsTotal,
<a name="l00069"></a>00069                     std::ostream      &amp;streamTo);
<a name="l00070"></a>00070       
<a name="l00071"></a>00071       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1ProgressWatch.html#5c47526a1f7ded8f3bbd6fbee5c7c900">~ProgressWatch</a>();
<a name="l00072"></a>00072       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFastSatSolver_1_1ProgressWatch.html#7ff19734eb024bd6f3e2ad95647b1b27" title="Event notification, usually called by object implementing ISubject interface.">notify</a>();
<a name="l00073"></a>00073     <span class="keyword">private</span>:
<a name="l00074"></a>00074       <span class="keyword">struct </span><a class="code" href="structFastSatSolver_1_1ProgressWatch_1_1Private.html">Private</a>;
<a name="l00075"></a>00075       <a class="code" href="structFastSatSolver_1_1ProgressWatch_1_1Private.html">Private</a> *d;
<a name="l00076"></a>00076   };
<a name="l00077"></a>00077 
<a name="l00083"></a><a class="code" href="classFastSatSolver_1_1SolutionsCountStop.html">00083</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1SolutionsCountStop.html" title="Observer which stop solver after specified count of solutions is found.">SolutionsCountStop</a>: <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IObserver.html" title="Simple observer&amp;#39;s base class.">IObserver</a> {
<a name="l00084"></a>00084     <span class="keyword">public</span>:
<a name="l00089"></a>00089       <a class="code" href="classFastSatSolver_1_1SolutionsCountStop.html#22aa639cca1856e0b131b89fd0eea59f">SolutionsCountStop</a>(<a class="code" href="classFastSatSolver_1_1AbstractSatSolver.html" title="SAT Solver base class.">AbstractSatSolver</a> *solver, <span class="keywordtype">int</span> minCountOfSolutions);
<a name="l00090"></a>00090       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1SolutionsCountStop.html#24c5bffeebdc7451f16a053c79302c0c">~SolutionsCountStop</a>();
<a name="l00091"></a>00091       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFastSatSolver_1_1SolutionsCountStop.html#7ff19734eb024bd6f3e2ad95647b1b27" title="Event notification, usually called by object implementing ISubject interface.">notify</a>();
<a name="l00092"></a>00092     <span class="keyword">private</span>:
<a name="l00093"></a>00093       <span class="keyword">struct </span><a class="code" href="structFastSatSolver_1_1SolutionsCountStop_1_1Private.html">Private</a>;
<a name="l00094"></a>00094       <a class="code" href="structFastSatSolver_1_1SolutionsCountStop_1_1Private.html">Private</a> *d;
<a name="l00095"></a>00095   };
<a name="l00096"></a>00096 
<a name="l00101"></a><a class="code" href="classFastSatSolver_1_1FitnessWatch.html">00101</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1FitnessWatch.html" title="Observer which write out message when maxFitness value is increased.">FitnessWatch</a>: <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IObserver.html" title="Simple observer&amp;#39;s base class.">IObserver</a> {
<a name="l00102"></a>00102     <span class="keyword">public</span>:
<a name="l00107"></a>00107       <a class="code" href="classFastSatSolver_1_1FitnessWatch.html#0d1f0664e9719faf63fef42d76e92ffc">FitnessWatch</a>(<a class="code" href="classFastSatSolver_1_1AbstractSatSolver.html" title="SAT Solver base class.">AbstractSatSolver</a> *solver, std::ostream &amp;streamTo);
<a name="l00108"></a>00108       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1FitnessWatch.html#692c368d6c771d6cd37e78ea66776748">~FitnessWatch</a>();
<a name="l00109"></a>00109       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFastSatSolver_1_1FitnessWatch.html#7ff19734eb024bd6f3e2ad95647b1b27" title="Event notification, usually called by object implementing ISubject interface.">notify</a>();
<a name="l00110"></a>00110       <span class="keywordtype">void</span> <a class="code" href="classFastSatSolver_1_1FitnessWatch.html#d20897c5c8bd47f5d4005989bead0e55">reset</a>();
<a name="l00111"></a>00111     <span class="keyword">private</span>:
<a name="l00112"></a>00112       <span class="keyword">struct </span><a class="code" href="structFastSatSolver_1_1FitnessWatch_1_1Private.html">Private</a>;
<a name="l00113"></a>00113       <a class="code" href="structFastSatSolver_1_1FitnessWatch_1_1Private.html">Private</a> *d;
<a name="l00114"></a>00114   };
<a name="l00115"></a>00115 
<a name="l00120"></a><a class="code" href="classFastSatSolver_1_1ResultsWatch.html">00120</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1ResultsWatch.html" title="Observer which write out message when solution is found.">ResultsWatch</a>: <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IObserver.html" title="Simple observer&amp;#39;s base class.">IObserver</a> {
<a name="l00121"></a>00121     <span class="keyword">public</span>:
<a name="l00126"></a>00126       <a class="code" href="classFastSatSolver_1_1ResultsWatch.html#f921d2c5a2ab1812697c3ba133f3a6aa">ResultsWatch</a>(<a class="code" href="classFastSatSolver_1_1AbstractSatSolver.html" title="SAT Solver base class.">AbstractSatSolver</a> *solver, std::ostream &amp;streamTo);
<a name="l00127"></a>00127       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1ResultsWatch.html#2c8aa4e33454d8ac246f3fecf18a0e4e">~ResultsWatch</a>();
<a name="l00128"></a>00128       <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classFastSatSolver_1_1ResultsWatch.html#7ff19734eb024bd6f3e2ad95647b1b27" title="Event notification, usually called by object implementing ISubject interface.">notify</a>();
<a name="l00129"></a>00129     <span class="keyword">private</span>:
<a name="l00130"></a>00130       <span class="keyword">struct </span><a class="code" href="structFastSatSolver_1_1ResultsWatch_1_1Private.html">Private</a>;
<a name="l00131"></a>00131       <a class="code" href="structFastSatSolver_1_1ResultsWatch_1_1Private.html">Private</a> *d;
<a name="l00132"></a>00132   };
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 } <span class="comment">// namespace FastSatSolver</span>
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 <span class="preprocessor">#endif // SATSOLVEROBSERVER_H</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 5 22:30:22 2008 for Fast SAT Solver by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>