#include <SatProblem.h>
Definition at line 115 of file SatProblem.h.
Public Member Functions | |||||||
SatProblem () | |||||||
~SatProblem () | |||||||
void | loadFromFile (std::string fileName) | ||||||
Load SAT Problem specification from file. | |||||||
void | loadFromInput () | ||||||
Load SAT Problem specification from standard input. | |||||||
int | getVarsCount () | ||||||
| |||||||
std::string | getVarName (int index) | ||||||
| |||||||
int | getFormulasCount () | ||||||
| |||||||
int | getSatsCount (ISatItem *data) | ||||||
Evaluate all formulas in container using given data and return satisfaction ratio.
| |||||||
bool | hasError () | ||||||
| |||||||
Classes | |||||||
struct | Private |
SatProblem | ( | ) |
~SatProblem | ( | ) |
Definition at line 54 of file SatProblem.cpp.
void loadFromFile | ( | std::string | fileName | ) |
Load SAT Problem specification from file.
fileName | File name to read and parse. |
Definition at line 57 of file SatProblem.cpp.
References SatProblem::Private::fileName, and SatProblem::Private::parseFile().
Referenced by main().
void loadFromInput | ( | ) |
Load SAT Problem specification from standard input.
Definition at line 81 of file SatProblem.cpp.
References SatProblem::Private::fileName, and SatProblem::Private::parseFile().
Referenced by main().
int getVarsCount | ( | ) |
Definition at line 165 of file SatProblem.cpp.
References VariableContainer::getLength(), and SatProblem::Private::vc.
Referenced by BlindSatSolver::BlindSatSolver(), BlindSatSolver::doStep(), GaSatSolver::GaSatSolver(), main(), and SatItemVector::writeOut().
string getVarName | ( | int | index | ) |
index | Index of variable should be in range <0, getVarsCount()-1>. |
index |
Definition at line 174 of file SatProblem.cpp.
References VariableContainer::getVarName(), and SatProblem::Private::vc.
Referenced by main(), and SatItemVector::writeOut().
int getFormulasCount | ( | ) |
Definition at line 182 of file SatProblem.cpp.
References SatProblem::Private::fc, and FormulaContainer::getLength().
Referenced by BlindSatSolver::doStep(), GaSatSolver::Private::fitness(), and main().
int getSatsCount | ( | ISatItem * | data | ) |
Evaluate all formulas in container using given data and return satisfaction ratio.
data | Evaluation data to use for evaluation. Consider FastSatSolver::ISatItem interface for detail. |
int
data |
data |
Definition at line 191 of file SatProblem.cpp.
References FormulaContainer::evalAll(), and SatProblem::Private::fc.
Referenced by BlindSatSolver::doStep(), and GaSatSolver::Private::fitness().
bool hasError | ( | ) |
Definition at line 199 of file SatProblem.cpp.
References SatProblem::Private::hasError.
Referenced by main().