org.sat4j.minisat.restarts
Class LubyRestarts

java.lang.Object
  extended by org.sat4j.minisat.restarts.LubyRestarts
All Implemented Interfaces:
Serializable, RestartStrategy

public final class LubyRestarts
extends Object
implements RestartStrategy

Luby series

See Also:
Serialized Form

Constructor Summary
LubyRestarts()
           
LubyRestarts(int factor)
           
 
Method Summary
 int getFactor()
           
 void init(SearchParams params)
          Hook method called just before the search starts.
static int luby(int i)
           
 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)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LubyRestarts

public LubyRestarts()

LubyRestarts

public LubyRestarts(int factor)
Parameters:
factor - the factor used for the Luby series.
Since:
2.1
Method Detail

luby

public static final int luby(int i)

setFactor

public final void setFactor(int factor)

getFactor

public int getFactor()

init

public void init(SearchParams params)
Description copied from interface: RestartStrategy
Hook method called just before the search starts.

Specified by:
init in interface RestartStrategy
Parameters:
params - the user's search parameters.

nextRestartNumberOfConflict

public long nextRestartNumberOfConflict()
Description copied from interface: RestartStrategy
Ask for the next restart in number of conflicts.

Specified by:
nextRestartNumberOfConflict in interface RestartStrategy
Returns:
the delay in conflicts before the next restart.

onRestart

public void onRestart()
Description copied from interface: RestartStrategy
Hook method called when a restart occurs (once the solver has backtracked to top decision level).

Specified by:
onRestart in interface RestartStrategy

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.