#include <GaSatSolver.h>


Definition at line 86 of file GaSatSolver.h.
Public Member Functions | |
| virtual | ~GaSatSolver () |
| const GAStatistics & | getStatistics () const |
| Returns useful statistic data managed by GAStatistics class. | |
| virtual SatProblem * | getProblem () |
| Returns pointer to instance of SatProblem used by solver. | |
| virtual int | getSolutionsCount () |
| Returns current count solutions founded by solver. | |
| virtual SatItemVector * | getSolutionVector () |
| Returns a set of solutions founded by solver. | |
| virtual float | minFitness () |
| Returns fitness of the Worst solution managed by solver. | |
| virtual float | avgFitness () |
| Returns average fitness computed by solver. | |
| virtual float | maxFitness () |
| Returns the Best fitness founded by solver. | |
| virtual void | start () |
| Start process execution. This method returns control after process ends (or after it is stopped by stop() or reset() method). | |
| virtual void | stop () |
| Stop currently executed process as soon as possible. | |
| virtual void | reset () |
| Reset process to its initial state. | |
| virtual long | getTimeElapsed () |
| Returns time elapsed by activity. | |
| virtual int | getStepsCount () |
| Returns current step number. | |
| virtual void | addObserver (IObserver *) |
| Add observer to list of listeners. | |
Static Public Member Functions | |
| static GaSatSolver * | create (SatProblem *problem, const GAParameterList ¶ms) |
| Simple factory method. | |
| static void | registerDefaultParameters (GAParameterList ¶ms) |
| Extends GAParameterList with GA-specific parameters. | |
Protected Member Functions | |
| GaSatSolver (SatProblem *problem, const GAParameterList ¶ms) | |
| Non-public constructor. Use static method create() instead. | |
| virtual void | initialize () |
| Initialize process. | |
| virtual void | doStep () |
| Do one step of process. | |
| void | notify () |
| Send notification to all observers (listeners). | |
Classes | |
| struct | Private |
| ~GaSatSolver | ( | ) | [virtual] |
Definition at line 109 of file GaSatSolver.cpp.
References GaSatSolver::Private::ga, GaSatSolver::Private::genome, and GaSatSolver::Private::resultSet.
| GaSatSolver | ( | SatProblem * | problem, | |
| const GAParameterList & | params | |||
| ) | [protected] |
Non-public constructor. Use static method create() instead.
| problem | SatProblem instance containing SAT problem to solve. | |
| params | GAParameterList containing GA-specific parameters. |
Definition at line 92 of file GaSatSolver.cpp.
References GaSatSolver::Private::fitness(), GaSatSolver::Private::ga, GaSatSolver::Private::genome, SatProblem::getVarsCount(), GaSatSolver::Private::maxFitness, GaSatSolver::Private::problem, GaSatSolver::Private::resultSet, and GaSatSolver::Private::solver.
Referenced by GaSatSolver::create().
| GaSatSolver * create | ( | SatProblem * | problem, | |
| const GAParameterList & | params | |||
| ) | [static] |
Simple factory method.
| problem | SatProblem instance containing SAT problem to solve. | |
| params | GAParameterList containing GA-specific parameters. |
Definition at line 115 of file GaSatSolver.cpp.
References GaSatSolver::GaSatSolver(), and GaSatSolver::initialize().
| void registerDefaultParameters | ( | GAParameterList & | params | ) | [static] |
Extends GAParameterList with GA-specific parameters.
| params | Reference to GAParameterList object managed by caller. |
Definition at line 120 of file GaSatSolver.cpp.
| const GAStatistics & getStatistics | ( | ) | const |
Returns useful statistic data managed by GAStatistics class.
Definition at line 128 of file GaSatSolver.cpp.
References GaSatSolver::Private::ga.
Referenced by main(), and FitnessWatch::notify().
| SatProblem * getProblem | ( | ) | [virtual] |
Returns pointer to instance of SatProblem used by solver.
Implements AbstractSatSolver.
Definition at line 125 of file GaSatSolver.cpp.
References GaSatSolver::Private::problem.
| int getSolutionsCount | ( | ) | [virtual] |
Returns current count solutions founded by solver.
Implements AbstractSatSolver.
Definition at line 131 of file GaSatSolver.cpp.
References SatItemSet::getLength(), and GaSatSolver::Private::resultSet.
| SatItemVector * getSolutionVector | ( | ) | [virtual] |
Returns a set of solutions founded by solver.
Implements AbstractSatSolver.
Definition at line 134 of file GaSatSolver.cpp.
References SatItemSet::createVector(), and GaSatSolver::Private::resultSet.
| float minFitness | ( | ) | [virtual] |
Returns fitness of the Worst solution managed by solver.
Implements AbstractSatSolver.
Definition at line 137 of file GaSatSolver.cpp.
References GaSatSolver::Private::ga.
| float avgFitness | ( | ) | [virtual] |
Returns average fitness computed by solver.
Implements AbstractSatSolver.
Definition at line 140 of file GaSatSolver.cpp.
References GaSatSolver::Private::ga.
| float maxFitness | ( | ) | [virtual] |
Returns the Best fitness founded by solver.
Implements AbstractSatSolver.
Definition at line 143 of file GaSatSolver.cpp.
References GaSatSolver::Private::maxFitness.
| void initialize | ( | ) | [protected, virtual] |
Initialize process.
Implements AbstractProcess.
Definition at line 147 of file GaSatSolver.cpp.
References GaSatSolver::Private::ga, and GaSatSolver::Private::maxFitness.
Referenced by GaSatSolver::create().
| void doStep | ( | ) | [protected, virtual] |
Do one step of process.
Implements AbstractProcess.
Definition at line 155 of file GaSatSolver.cpp.
References GaSatSolver::Private::ga, and AbstractProcessWatched::stop().
| void start | ( | ) | [virtual, inherited] |
Start process execution. This method returns control after process ends (or after it is stopped by stop() or reset() method).
Reimplemented from AbstractProcess.
Definition at line 111 of file SatSolver.cpp.
References AbstractProcessWatched::Private::running, AbstractProcess::start(), and AbstractProcessWatched::Private::start.
| void stop | ( | ) | [virtual, inherited] |
Stop currently executed process as soon as possible.
Reimplemented from AbstractProcess.
Definition at line 117 of file SatSolver.cpp.
References AbstractProcessWatched::Private::currentElapsed(), AbstractProcessWatched::Private::running, AbstractProcess::stop(), and AbstractProcessWatched::Private::total.
Referenced by GaSatSolver::doStep(), BlindSatSolver::doStep(), TimedStop::notify(), and SolutionsCountStop::notify().
| void reset | ( | ) | [virtual, inherited] |
Reset process to its initial state.
Reimplemented from AbstractProcess.
Definition at line 125 of file SatSolver.cpp.
References AbstractProcess::reset(), AbstractProcessWatched::Private::running, and AbstractProcessWatched::Private::total.
| long getTimeElapsed | ( | ) | [virtual, inherited] |
Returns time elapsed by activity.
Implements IStopWatch.
Definition at line 131 of file SatSolver.cpp.
References AbstractProcessWatched::Private::currentElapsed(), AbstractProcessWatched::Private::running, and AbstractProcessWatched::Private::total.
Referenced by ResultsWatch::notify(), FitnessWatch::notify(), and TimedStop::notify().
| int getStepsCount | ( | ) | [virtual, inherited] |
Returns current step number.
Definition at line 86 of file SatSolver.cpp.
References AbstractProcess::Private::steps.
Referenced by ProgressWatch::notify().
| void addObserver | ( | IObserver * | observer | ) | [virtual, inherited] |
Add observer to list of listeners.
| observer | Observer object to add to list of listeners. |
Design pattern observer
Implements ISubject.
Definition at line 46 of file SatSolver.cpp.
References AbstractSubject::Private::container.
Referenced by main().
| void notify | ( | ) | [protected, inherited] |
Send notification to all observers (listeners).
Definition at line 49 of file SatSolver.cpp.
References AbstractSubject::Private::container, and IObserver::notify().
Referenced by BlindSatSolver::doStep(), GaSatSolver::Private::fitness(), and AbstractProcess::start().
1.5.4