|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
95 void addMultiple(
int Amount, ...);
99 for (
int i = 0; i < m_ps.
size(); i++) {
110 for (
int i = 0; i < m_ps.
size(); i++) {
115 std::cout <<
"Variable not in Clause" << std::endl;
124 for (
int i = 0; i < m_ps.
size(); i++) {
133 if (
sign(lit) == 0) {
141 for (
int i = 0; i < m_ps.
size() - 1; i++) {
142 std::cout << convertLitSign(m_ps[i]) <<
Internal::var(m_ps[i]) + 1 <<
" || ";
144 std::cout << convertLitSign(m_ps[m_ps.
size() - 1])
173 return m_vModel[
var - 1] != 0;
180 m_vModel.reserve(S.
model.size());
181 for (
int i = 0; i < S.
model.size(); i++) {
187 for (
int i = 0; i < (int)m_vModel.size(); i++) {
188 std::cout <<
"Var " << i <<
" = " << m_vModel[i] <<
" ";
190 std::cout << std::endl;
236 for (
unsigned int i = 0; i < Count; i++) {
251 void finalizeClause(
const clause cl);
254 template<
class Iteratable>
256 auto cl = newClause();
257 for (
auto literal : literals) {
268 bool finalizeNotExtensibleClause(
const clause cl);
271 Clause* getClause(
const int pos);
274 void removeClause(
int i);
290 bool solve(
Model& ReturnModel);
298 bool solve(
Model& ReturnModel,
double& timeLimit);
305 removeClause(clausePos);
306 m_Clauses[clausePos]->add(signedVar);
307 Solver::addClause(m_Clauses[clausePos]->m_ps);
314 bool readDimacs(
const char* filename);
317 bool readDimacs(
const string& filename);
320 bool readDimacs(std::istream& in);
323 bool writeDimacs(
const char* filename);
326 bool writeDimacs(
const string& filename);
329 bool writeDimacs(std::ostream& f);
Internal::vec< Internal::Lit > m_ps
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Internal::Solver::SolverStatus solverStatus
void add(Internal::Var signedVar)
adds a literal to the clause
void setModel(Internal::Solver &S)
sets the model to the model of minsat
void copyTo(vec< T > ©) const
Clause(const Clause &src)
void setSign(Internal::Var x, bool sign)
sets the sign of a variable if its present within the clause
std::vector< int > m_vModel
internal storage of a model by minisat
bool getValue(int var) const
returns the value of the assignemt of a variable in the model
Represents a simple class for model storage.
static char convertLitSign(Internal::Lit lit)
converts the sign of a lit into char
bool getSign(Internal::Var x)
returns the sign of a variable if its present within the clause, if the variable is not representet f...
Represents a simple class for clause storage.
Basic declarations, included by all source files.
void clear(bool dealloc=false)
Lit mkLit(Var var, bool sign=false)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
std::string intToString(const int i)
void removeLit(Internal::Var x)