|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.minisat.restarts.LubyRestarts
public class LubyRestarts
Luby series code taken from SATZ_rand 5.0 from Henry Kautz http://www.cs.rochester.edu/u/kautz/satz-rand/satz-rand-v5.0.tgz
Luby's series
long luby_super(int i)
{
long power;
int k;
if (i<=0){
fprintf(stderr, "bad argument super(%d)\n", i);
exit(1);
}
/* let 2ˆk be the least power of 2 >= (i+1)
k = 1;
power = 2;
while (power < (i+1)){
k += 1;
power *= 2;
}
if (power == (i+1)) return (power/2);
return (luby_super(i - (power/2) + 1));
}
| Constructor Summary | |
|---|---|
LubyRestarts()
|
|
| Method Summary | |
|---|---|
int |
getFactor()
|
void |
init(SearchParams params)
Hook method called just before the search starts. |
long |
nextRestartNumberOfConflict()
Ask for the next restart in number of conflicts. |
void |
onRestart()
Hook method called when a restart occurs (once the solver has backtracked to top decision level). |
void |
setFactor(int factor)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LubyRestarts()
| Method Detail |
|---|
public void setFactor(int factor)
public int getFactor()
public void init(SearchParams params)
RestartStrategy
init in interface RestartStrategyparams - the user's search parameters.public long nextRestartNumberOfConflict()
RestartStrategy
nextRestartNumberOfConflict in interface RestartStrategypublic void onRestart()
RestartStrategy
onRestart in interface RestartStrategypublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||