org.sat4j.tools
Class SolutionCounter

java.lang.Object
  extended by org.sat4j.tools.SolverDecorator
      extended by org.sat4j.tools.SolutionCounter
All Implemented Interfaces:
java.io.Serializable, IProblem, ISolver

public class SolutionCounter
extends SolverDecorator

Another solver decorator that counts the number of solutions. Note that this approach is quite naive so do not expect it to work on large examples.

Author:
leberre
See Also:
Serialized Form

Constructor Summary
SolutionCounter(ISolver solver)
           
 
Method Summary
 long countSolutions()
           
 
Methods inherited from class org.sat4j.tools.SolverDecorator
addAllClauses, addAtLeast, addAtMost, addClause, addPseudoBoolean, decorated, getTimeout, isSatisfiable, isSatisfiable, model, nConstraints, newVar, newVar, nVars, printStat, removeConstr, reset, setTimeout, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolutionCounter

public SolutionCounter(ISolver solver)
Method Detail

countSolutions

public long countSolutions()
                    throws TimeoutException
Throws:
TimeoutException