|
SugarTrace version 1.0.1 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsugartracer.decoder.EncodingMap
public class EncodingMap
Represents the mapping from CSP variables to SAT variables.
Constructor Summary | |
---|---|
EncodingMap()
|
Method Summary | |
---|---|
void |
addBoolVariable(String name,
int code)
Adds a CSP boolean variable to this object. |
void |
addIntVariable(String name,
int code,
int[][] domain)
Adds a CSP integer variable to this object. |
Variable |
findVariable(int code)
Finds the CSP variable whose encoded form uses the propositional variable code. |
Variable |
findVariable(String name)
Finds the CSP variable of the given name. |
List<Variable> |
getVariables()
Returns the list of CSP variables. |
void |
load(String mapFileName)
Loads the mapping from the map file generated by Sugar. |
int |
size()
Returns the size of CSP variables. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EncodingMap()
Method Detail |
---|
public int size()
public List<Variable> getVariables()
public Variable findVariable(String name)
name
- the name of the variable
public Variable findVariable(int code)
code
- index of the propositional variable
public void addIntVariable(String name, int code, int[][] domain)
name
- code
- domain
- public void addBoolVariable(String name, int code)
name
- code
- public void load(String mapFileName) throws IOException
mapFileName
- the map file to be loaded
IOException
public String toString()
toString
in class Object
|
SugarTrace version 1.0.1 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |