|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.util.MDD
public class MDD
Defines an MDD as used in the following paper. K.C. Cheng and R.H. Yap, "Maintaining generalized arc consistency on ad-hoc n-ary constraints.", CP 2008.
| Field Summary | |
|---|---|
int[] |
diagram
For each node at given index i-th it specifies all possible outgoing edges. |
int[] |
domainLimits
The initial domain limits used to create an MDD array representation. |
int |
freePosition
It specifies the first position in the array which is available for use. |
static int |
NOEDGE
It specifies an identifier which denotes lack of the edge for a given value (in the context of the current level (variable) of an MDD. |
static int |
startSize
The initial size of the array representing an MDD. |
static int |
TERMINAL
It specifies an identifier which denotes a terminal node. |
IntVar[] |
vars
The ordered list of variables participating in MDD. |
IndexDomainView[] |
views
It creates index domain views so operations based on indexes of values can be performed efficiently. |
static java.lang.String[] |
xmlAttributes
It specifies the arguments required to be saved by an XML format as well as the constructor being called to recreate an object from an XML format. |
| Constructor Summary | |
|---|---|
MDD(IntVar[] vars)
It creates and MDD representation given the list of variables. |
|
MDD(IntVar[] vars,
int[][] table)
It creates and MDD representation given the list of variables and (dis)allowed tuples. |
|
MDD(IntVar[] vars,
int[] diagram,
int[] domainLimits)
It creates an MDD. |
|
MDD(IntVar[] vars,
int[] minimumDomainLimits,
int[][] table)
It creates and MDD representation given the list of variables and (dis)allowed tuples. |
|
| Method Summary | |
|---|---|
void |
addTuple(int[] tuple)
It allows to add one by one tuple before the reduction of the initial MDD takes place. |
boolean |
checkIfAllowed()
|
boolean |
checkIfAllowed(int[] tuple)
It checks if the specified tuple is allowed. |
void |
ensureSize(int size)
It makes sure that diagram uses an array of at least given size. |
int |
findPosition(int value,
int[] values)
It finds a position of a value inside the array. |
void |
reduce()
It reduces MDD to minimal size. |
MDD |
reuse(IntVar[] vars)
If possible it will return an MDD which reuse an array representation of the current MDD. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TERMINAL
public static final int NOEDGE
public IntVar[] vars
public int[] domainLimits
public int[] diagram
public IndexDomainView[] views
public int freePosition
public static int startSize
public static java.lang.String[] xmlAttributes
| Constructor Detail |
|---|
public MDD(IntVar[] vars,
int[] diagram,
int[] domainLimits)
vars - variables involved in this multiple-value decision diagram.diagram - an int array representation of the diagram.domainLimits - the limits on the number of values imposed on each variable.
public MDD(IntVar[] vars,
int[] minimumDomainLimits,
int[][] table)
vars - variables and their order used in the MDD.minimumDomainLimits - it specifies the minimal number of values used for each of the variables.table - it specifies the allowed tuples which are being converted into an MDD.
public MDD(IntVar[] vars,
int[][] table)
vars - variables and their order used in the MDD.table - it specifies the allowed tuples which are being converted into an MDD.public MDD(IntVar[] vars)
vars - variables and their order used in the MDD.| Method Detail |
|---|
public MDD reuse(IntVar[] vars)
vars - array of new variables for which this MDD is being reused for.
public void addTuple(int[] tuple)
tuple - an allowed tuple being added to MDD.public void ensureSize(int size)
size - the size the array must be at least of.
public int findPosition(int value,
int[] values)
value - the value being searched.values - the array in which the value is being searched for.
public void reduce()
public boolean checkIfAllowed(int[] tuple)
tuple - the tuple being checked.
public boolean checkIfAllowed()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||