00001 /* 00002 * Copyright (C) 2008 Kamil Dudka <xdudka00@stud.fit.vutbr.cz> 00003 * 00004 * This file is part of fss (Fast SAT Solver). 00005 * 00006 * fss is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * any later version. 00010 * 00011 * fss is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with fss. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #ifndef BLINDSATSOLVER_H 00021 #define BLINDSATSOLVER_H 00022 00031 #include "SatSolver.h" 00032 00033 namespace FastSatSolver { 00034 00039 class LongSatItem: public ISatItem { 00040 public: 00045 LongSatItem(int length, long fromNumber); 00046 virtual ~LongSatItem(); 00047 virtual int getLength() const; 00048 virtual bool getBit(int index) const; 00049 virtual LongSatItem* clone() const; 00050 private: 00051 int length_; 00052 long lNumber_; 00053 }; 00054 00059 class BlindSatSolver: public AbstractSatSolver 00060 { 00061 public: 00068 BlindSatSolver(SatProblem *problem, int stepWidth); 00069 virtual ~BlindSatSolver(); 00070 virtual SatProblem* getProblem(); 00071 virtual int getSolutionsCount(); 00072 virtual SatItemVector* getSolutionVector(); 00073 virtual float minFitness(); 00074 virtual float avgFitness(); 00075 virtual float maxFitness(); 00076 00077 protected: 00078 virtual void initialize(); 00079 virtual void doStep(); 00080 00081 private: 00082 struct Private; 00083 Private *d; 00084 }; 00085 00086 } // namespace FastSatSolver 00087 00088 #endif // BLINDSATSOLVER_H 00089
1.5.4