org.sat4j.tools
Class DimacsArrayReader
java.lang.Object
org.sat4j.tools.DimacsArrayReader
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ExtendedDimacsArrayReader
public class DimacsArrayReader
- extends Object
- implements Serializable
Very simple Dimacs array reader. Allow solvers to read the constraints from
arrays that effectively contain Dimacs formatted lines (without the
terminating 0).
Adaptation of org.sat4j.reader.DimacsReader.
- Author:
- dlb, fuhs
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
solver
protected final ISolver solver
DimacsArrayReader
public DimacsArrayReader(ISolver solver)
handleConstr
protected boolean handleConstr(int gateType,
int output,
int[] inputs)
throws ContradictionException
- Throws:
ContradictionException
parseInstance
public ISolver parseInstance(int[] gateType,
int[] outputs,
int[][] inputs,
int maxVar)
throws ContradictionException
- Parameters:
gateType
- gateType[i] is the type of gate i according to the Extended
Dimacs specs; ignored in DimacsArrayReader, but important for
inheriting classesoutputs
- outputs[i] is the number of the output; ignored in
DimacsArrayReaderinputs
- inputs[i] contains the clauses in DimacsArrayReader; an
overriding class might have it contain the inputs of the
current gatemaxVar
- the maximum number of assigned ids
- Throws:
ContradictionException
- si le probleme est trivialement inconsitant
decode
public String decode(int[] model)
getSolver
protected ISolver getSolver()
Copyright © 2011 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.