#ifndef __WALKSAT_H__ #define __WALKSAT_H__ #include "../includes/globals.h" // /* clauses : contains each of the CNF clauses prob_rand_walk : probability of choosing to do a random walk move max_flips : number of flips allowed per each restart max_tries : maximum number of restarts before giving up */ int WalkSat(float prob_rand_walk,int max_flips,int max_tries,int *fls,int *retries,int *literalAssignment); int MyWalkSat(float prob_rand_walk,int max_flips,int max_tries); /* if all the clauses are satisfied, return SUCCESS otherwise return * FAILURE */ int allClausesSatisfied(void); /* Flips the literal in the specified clause which causes the * maximum increase in the number of satisfied clauses */ //int flipMaxClauseSatisfyingLiteral(int clause_num); void flipMaxClauseSatisfyingLiteral(int clause_num); /* Determines if the specified clause is TRUE, returns FAILURE if not TRUE * and SUCCESS if TRUE*/ int IsTrueClause(int cl_num); void setTFValues(void); int countTFFlips(void); void printLiterals(void); #endif