|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectRandomSearchSatSolver
public class RandomSearchSatSolver
This is a trivial implementation of SatSolver that simply generates random models and returns the best one when time runs out. You can use this class as a sample when writing your own.
| Constructor Summary | |
|---|---|
RandomSearchSatSolver()
A constructor for this class. |
|
| Method Summary | |
|---|---|
java.lang.String |
author()
The author of this sat-solver. |
java.lang.String |
description()
A brief description of this sat-solver. |
boolean[] |
solve(Literal[][] cnf,
int num_symbols,
Timer timer)
This routine attempts to solve the satisfaction problem by trying random models until time runs out and returning the best one. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomSearchSatSolver()
| Method Detail |
|---|
public boolean[] solve(Literal[][] cnf,
int num_symbols,
Timer timer)
solve in interface SatSolvercnf - the given cnf, represented as an array of arrays of Literalsnum_symbols - the number of distinct symbols in the cnftimer - the given timer objectpublic java.lang.String author()
author in interface SatSolverpublic java.lang.String description()
description in interface SatSolver
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||