Package org.jacop.fz
Class Tables
- java.lang.Object
-
- org.jacop.fz.Tables
-
public class Tables extends java.lang.ObjectThis class contains information about all variables, including the variables which are used by search.- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<IntVar,IntVar>aliasTable(package private) java.util.HashMap<java.lang.Double,FloatVar>constantFloatTable(package private) java.util.HashMap<java.lang.Integer,IntVar>constantTable(package private) java.util.HashMap<java.lang.Integer,BooleanVar>constantTableBoolean(package private) java.util.ArrayList<Var[]>defaultSearchArrays(package private) java.util.ArrayList<Var[]>defaultSearchFloatArrays(package private) java.util.ArrayList<Var>defaultSearchFloatVariables(package private) java.util.ArrayList<Var[]>defaultSearchSetArrays(package private) java.util.ArrayList<Var>defaultSearchSetVariables(package private) java.util.ArrayList<Var>defaultSearchVariables(package private) java.util.HashMap<java.lang.String,double[]>floatArrayTable(package private) java.util.HashMap<java.lang.String,java.lang.Double>floatTable(package private) java.util.HashMap<java.lang.String,int[]>intArrayTable(package private) java.util.HashMap<java.lang.String,java.lang.Integer>intTable(package private) intnumberBoolVariables(package private) intnumberFloatVariables(package private) intnumberSetVariables(package private) java.util.ArrayList<OutputArrayAnnotation>outputArray(package private) java.util.ArrayList<Var>outputVariables(package private) java.util.HashMap<java.lang.String,IntDomain[]>setArrayTable(package private) java.util.HashMap<java.lang.String,IntDomain>setTable(package private) java.util.HashMap<java.lang.String,SetVar[]>setVariableArrayTable(package private) java.util.HashMap<java.lang.String,SetVar>setVariableTable(package private) Storestore(package private) java.util.HashMap<java.lang.String,IntVar[]>variableArrayTable(package private) java.util.HashMap<java.lang.String,FloatVar[]>variableFloatArrayTable(package private) java.util.HashMap<java.lang.String,FloatVar>variableFloatTable(package private) java.util.HashMap<java.lang.String,IntVar>variableTable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlias(IntVar b, IntVar v)voidaddFloat(java.lang.String ident, double val)It adds an float parameter.voidaddFloatArray(java.lang.String ident, double[] array)voidaddFloatVariable(java.lang.String ident, FloatVar var)It adds a variable with a given identity to the storage.voidaddInt(java.lang.String ident, int val)It adds an int parameter.voidaddIntArray(java.lang.String ident, int[] array)It stores an int array.voidaddOutArray(OutputArrayAnnotation v)It adds an output array annotation.voidaddOutVar(Var v)It adds an output variable.voidaddSearchArray(Var[] v)It adds a search array.voidaddSearchFloatArray(Var[] v)It adds a search array.voidaddSearchFloatVar(Var v)It adds a search variable.voidaddSearchSetArray(Var[] v)It adds an array of search set variables.voidaddSearchSetVar(Var v)It adds a search set variable.voidaddSearchVar(Var v)It adds a search variable.voidaddSet(java.lang.String ident, IntDomain val)It adds a set of the given identity.voidaddSetArray(java.lang.String ident, IntDomain[] array)It adds the set array to the storage.voidaddSetVariable(java.lang.String ident, SetVar var)It adds the set variable of the given identity.voidaddSetVariableArray(java.lang.String ident, SetVar[] array)It stores the array of the set variables with the specified identity.voidaddVariable(java.lang.String ident, IntVar var)It adds a variable with a given identity to the storage.voidaddVariableArray(java.lang.String ident, IntVar[] array)It adds a variable array to the storage.voidaddVariableFloatArray(java.lang.String ident, FloatVar[] array)It adds a float variable array to the storage.java.lang.DoublecheckFloat(java.lang.String ident)It returns an Double parameter of a given identity.java.lang.IntegercheckInt(java.lang.String ident)It returns an Integer parameter of a given identity.(package private) IntVargetAlias(IntVar b)IntVargetConstant(int c)BooleanVargetConstantBoolean(int c)doublegetFloat(java.lang.String ident)It returns an float parameter of a given identity.double[]getFloatArray(java.lang.String ident)It obtains the int array of the given unique identity.FloatVargetFloatConstant(double c)FloatVargetFloatVariable(java.lang.String ident)It returns the variable of the given identity.intgetInt(java.lang.String ident)It returns an int parameter of a given identity.int[]getIntArray(java.lang.String ident)It obtains the int array of the given unique identity.intgetNumberBoolVariables()intgetNumberFloatVariables()intgetNumberSetVariables()IntDomaingetSet(java.lang.String ident)It returns the set of the given identity.IntDomain[]getSetArray(java.lang.String ident)It returns the set array of the given id.SetVargetSetVariable(java.lang.String ident)It returns the set variable of the given identity.SetVar[]getSetVariableArray(java.lang.String ident)It returns the array of set variables of the given identity.IntVargetVariable(java.lang.String ident)It returns the variable of the given identity.IntVar[]getVariableArray(java.lang.String ident)It returns the variable array of the given identity.FloatVar[]getVariableFloatArray(java.lang.String ident)It returns the float variable array of the given identity.booleanisOutput(Var v)It checks whether a variable is output variable.(package private) voidremoveAliasFromSearch()voidsetNumberBoolVariables(int n)voidsetNumberFloatVariables(int n)voidsetNumberOfAllVariables(int nb, int ns, int nf)voidsetNumberSetVariables(int n)java.lang.StringtoString()
-
-
-
Field Detail
-
store
Store store
-
constantTable
java.util.HashMap<java.lang.Integer,IntVar> constantTable
-
constantTableBoolean
java.util.HashMap<java.lang.Integer,BooleanVar> constantTableBoolean
-
constantFloatTable
java.util.HashMap<java.lang.Double,FloatVar> constantFloatTable
-
intTable
java.util.HashMap<java.lang.String,java.lang.Integer> intTable
-
floatTable
java.util.HashMap<java.lang.String,java.lang.Double> floatTable
-
intArrayTable
java.util.HashMap<java.lang.String,int[]> intArrayTable
-
floatArrayTable
java.util.HashMap<java.lang.String,double[]> floatArrayTable
-
setTable
java.util.HashMap<java.lang.String,IntDomain> setTable
-
setArrayTable
java.util.HashMap<java.lang.String,IntDomain[]> setArrayTable
-
variableTable
java.util.HashMap<java.lang.String,IntVar> variableTable
-
variableArrayTable
java.util.HashMap<java.lang.String,IntVar[]> variableArrayTable
-
variableFloatTable
java.util.HashMap<java.lang.String,FloatVar> variableFloatTable
-
variableFloatArrayTable
java.util.HashMap<java.lang.String,FloatVar[]> variableFloatArrayTable
-
setVariableTable
java.util.HashMap<java.lang.String,SetVar> setVariableTable
-
setVariableArrayTable
java.util.HashMap<java.lang.String,SetVar[]> setVariableArrayTable
-
outputVariables
java.util.ArrayList<Var> outputVariables
-
outputArray
java.util.ArrayList<OutputArrayAnnotation> outputArray
-
defaultSearchVariables
java.util.ArrayList<Var> defaultSearchVariables
-
defaultSearchFloatVariables
java.util.ArrayList<Var> defaultSearchFloatVariables
-
defaultSearchArrays
java.util.ArrayList<Var[]> defaultSearchArrays
-
defaultSearchFloatArrays
java.util.ArrayList<Var[]> defaultSearchFloatArrays
-
defaultSearchSetVariables
java.util.ArrayList<Var> defaultSearchSetVariables
-
defaultSearchSetArrays
java.util.ArrayList<Var[]> defaultSearchSetArrays
-
numberBoolVariables
int numberBoolVariables
-
numberFloatVariables
int numberFloatVariables
-
numberSetVariables
int numberSetVariables
-
-
Constructor Detail
-
Tables
public Tables()
It constructs the storage object to store different objects, like int, array of ints, sets, ... .
-
Tables
public Tables(Store s)
-
-
Method Detail
-
getConstant
public IntVar getConstant(int c)
-
getConstantBoolean
public BooleanVar getConstantBoolean(int c)
-
getFloatConstant
public FloatVar getFloatConstant(double c)
-
removeAliasFromSearch
void removeAliasFromSearch()
-
addInt
public void addInt(java.lang.String ident, int val)It adds an int parameter.- Parameters:
ident- the identity of the added int parameter.val- the value of the parameter.
-
getInt
public int getInt(java.lang.String ident)
It returns an int parameter of a given identity.- Parameters:
ident- the identify of the parameter.- Returns:
- the int value of the specified parameter.
-
checkInt
public java.lang.Integer checkInt(java.lang.String ident)
It returns an Integer parameter of a given identity.- Parameters:
ident- the identify of the parameter.- Returns:
- the int value of the specified parameter.
-
addFloat
public void addFloat(java.lang.String ident, double val)It adds an float parameter.- Parameters:
ident- the identity of the added int parameter.val- the value of the parameter.
-
getFloat
public double getFloat(java.lang.String ident)
It returns an float parameter of a given identity.- Parameters:
ident- the identify of the parameter.- Returns:
- the double value of the specified parameter.
-
checkFloat
public java.lang.Double checkFloat(java.lang.String ident)
It returns an Double parameter of a given identity.- Parameters:
ident- the identify of the parameter.- Returns:
- the Double value of the specified parameter.
-
addIntArray
public void addIntArray(java.lang.String ident, int[] array)It stores an int array.- Parameters:
ident- the identity of the stored array.array- the array being stored.
-
getIntArray
public int[] getIntArray(java.lang.String ident)
It obtains the int array of the given unique identity.- Parameters:
ident- the identity of the required array.- Returns:
- the int array with the specified identity.
-
addSet
public void addSet(java.lang.String ident, IntDomain val)It adds a set of the given identity.- Parameters:
ident- the identity of the set being added.val- the set being added.
-
getSet
public IntDomain getSet(java.lang.String ident)
It returns the set of the given identity.- Parameters:
ident- the identity of the searched set.- Returns:
- the set of the given identity.
-
addSetArray
public void addSetArray(java.lang.String ident, IntDomain[] array)It adds the set array to the storage.- Parameters:
ident- the identity of the added set array.array- the array being added.
-
getSetArray
public IntDomain[] getSetArray(java.lang.String ident)
It returns the set array of the given id.- Parameters:
ident- the unique id of the looked for set array.- Returns:
- the set array of the given identity.
-
addFloatArray
public void addFloatArray(java.lang.String ident, double[] array)
-
getFloatArray
public double[] getFloatArray(java.lang.String ident)
It obtains the int array of the given unique identity.- Parameters:
ident- the identity of the required array.- Returns:
- the int array with the specified identity.
-
addVariable
public void addVariable(java.lang.String ident, IntVar var)It adds a variable with a given identity to the storage.- Parameters:
ident- the identity of the added variable.var- the variable being added.
-
getVariable
public IntVar getVariable(java.lang.String ident)
It returns the variable of the given identity.- Parameters:
ident- the identity of the returned variable.- Returns:
- the variable of the given identity.
-
addFloatVariable
public void addFloatVariable(java.lang.String ident, FloatVar var)It adds a variable with a given identity to the storage.- Parameters:
ident- the identity of the added variable.var- the variable being added.
-
getFloatVariable
public FloatVar getFloatVariable(java.lang.String ident)
It returns the variable of the given identity.- Parameters:
ident- the identity of the returned variable.- Returns:
- the variable of the given identity.
-
addVariableArray
public void addVariableArray(java.lang.String ident, IntVar[] array)It adds a variable array to the storage.- Parameters:
ident- the identity of the added variable array.array- the array of variables being added.
-
getVariableArray
public IntVar[] getVariableArray(java.lang.String ident)
It returns the variable array of the given identity.- Parameters:
ident- the identity of the returned variable array.- Returns:
- the variable array of the given identity.
-
addVariableFloatArray
public void addVariableFloatArray(java.lang.String ident, FloatVar[] array)It adds a float variable array to the storage.- Parameters:
ident- the identity of the added variable array.array- the array of variables being added.
-
getVariableFloatArray
public FloatVar[] getVariableFloatArray(java.lang.String ident)
It returns the float variable array of the given identity.- Parameters:
ident- the identity of the returned variable array.- Returns:
- the variable array of the given identity.
-
addSetVariable
public void addSetVariable(java.lang.String ident, SetVar var)It adds the set variable of the given identity.- Parameters:
ident- the identity of the added set variable.var- the set variable being added.
-
getSetVariable
public SetVar getSetVariable(java.lang.String ident)
It returns the set variable of the given identity.- Parameters:
ident- the identity of the returned set variable.- Returns:
- the set variable of the given identity.
-
addSetVariableArray
public void addSetVariableArray(java.lang.String ident, SetVar[] array)It stores the array of the set variables with the specified identity.- Parameters:
ident- the identity of the stored array of set variables.array- the array of set variables being added.
-
getSetVariableArray
public SetVar[] getSetVariableArray(java.lang.String ident)
It returns the array of set variables of the given identity.- Parameters:
ident- the identity of the returned array of set variables.- Returns:
- the array of set variables with the given identity.
-
addOutVar
public void addOutVar(Var v)
It adds an output variable.- Parameters:
v- the output variable being added.
-
isOutput
public boolean isOutput(Var v)
It checks whether a variable is output variable.- Parameters:
v- the variable to be checked.- Returns:
- true if variable is output, false otherwise
-
addOutArray
public void addOutArray(OutputArrayAnnotation v)
It adds an output array annotation.- Parameters:
v- the output array annotation being added.
-
addSearchVar
public void addSearchVar(Var v)
It adds a search variable.- Parameters:
v- the search variable being added.
-
addSearchFloatVar
public void addSearchFloatVar(Var v)
It adds a search variable.- Parameters:
v- the search variable being added.
-
addSearchArray
public void addSearchArray(Var[] v)
It adds a search array.- Parameters:
v- the search array being added.
-
addSearchFloatArray
public void addSearchFloatArray(Var[] v)
It adds a search array.- Parameters:
v- the search array being added.
-
addSearchSetVar
public void addSearchSetVar(Var v)
It adds a search set variable.- Parameters:
v- the set search variable being added.
-
addSearchSetArray
public void addSearchSetArray(Var[] v)
It adds an array of search set variables.- Parameters:
v- array of set variables being added
-
setNumberOfAllVariables
public void setNumberOfAllVariables(int nb, int ns, int nf)
-
setNumberBoolVariables
public void setNumberBoolVariables(int n)
-
getNumberBoolVariables
public int getNumberBoolVariables()
-
setNumberFloatVariables
public void setNumberFloatVariables(int n)
-
getNumberFloatVariables
public int getNumberFloatVariables()
-
setNumberSetVariables
public void setNumberSetVariables(int n)
-
getNumberSetVariables
public int getNumberSetVariables()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-