SatProblem Class Reference
[SAT Problem]

#include <SatProblem.h>

Collaboration diagram for SatProblem:

Collaboration graph
[legend]

List of all members.


Detailed Description

SAT Problem module's facade.

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 ()
 
Returns:
Returns total count of variables managed by SatProblem.

std::string getVarName (int index)
 
Returns:
Returns name of variable with desired index.

int getFormulasCount ()
 
Returns:
Returns total count of formulas managed by SatProblem.

int getSatsCount (ISatItem *data)
 Evaluate all formulas in container using given data and return satisfaction ratio.

Parameters:
data Evaluation data to use for evaluation. Consider FastSatSolver::ISatItem interface for detail.
Returns:
Returns count of satisfaced formulas.

int

Parameters:
data 

bool hasError ()
 
Returns:
Returns true if SAT Problem is not valid.


Classes

struct  Private

Constructor & Destructor Documentation

SatProblem (  ) 

Definition at line 49 of file SatProblem.cpp.

References SatProblem::Private::hasError.

~SatProblem (  ) 

Definition at line 54 of file SatProblem.cpp.


Member Function Documentation

void loadFromFile ( std::string  fileName  ) 

Load SAT Problem specification from file.

Parameters:
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 (  ) 

Returns:
Returns total count of variables managed by SatProblem.

Returns:
int

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  ) 

Returns:
Returns name of variable with desired index.

Parameters:
index Index of variable should be in range <0, getVarsCount()-1>.
Returns:
string
Parameters:
index 

Definition at line 174 of file SatProblem.cpp.

References VariableContainer::getVarName(), and SatProblem::Private::vc.

Referenced by main(), and SatItemVector::writeOut().

int getFormulasCount (  ) 

Returns:
Returns total count of formulas managed by SatProblem.

Returns:

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.

Parameters:
data Evaluation data to use for evaluation. Consider FastSatSolver::ISatItem interface for detail.
Returns:
Returns count of satisfaced formulas.

int

Parameters:
data 

Returns:
int
Parameters:
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 (  ) 

Returns:
Returns true if SAT Problem is not valid.

Returns:
bool

Definition at line 199 of file SatProblem.cpp.

References SatProblem::Private::hasError.

Referenced by main().


The documentation for this class was generated from the following files:
Generated on Wed Nov 5 22:30:22 2008 for Fast SAT Solver by  doxygen 1.5.4