|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.toronto.cs.mdd.MDDManager
public class MDDManager
Multi-Valued Decision Diagram package add reference to authors and publications!
Nested Class Summary | |
---|---|
class |
MDDManager.MDDCubeIterator
|
class |
MDDManager.MDDMintermIterator
Iterates over minterms of a given value vars parameter is used to fill-in don't care variables |
Field Summary | |
---|---|
static int |
NO_VALUE
Used as an indicator for arbitrary value for a variable. |
Constructor Summary | |
---|---|
MDDManager(int nvars,
int _arity)
Constructor |
Method Summary | |
---|---|
MDDNode |
apply(ApplyFunctions.BinApplyFunction function,
MDDNode m1,
MDDNode m2)
|
MDDNode |
apply(ApplyFunctions.UnaryApplyFunction function,
MDDNode m1)
Apply a unary operation to MDDs. |
MDDNode |
buildCube(int[] vars,
int arity,
MDDNode top,
MDDNode bot)
|
MDDNode |
buildCube(int[] vars,
MDDNode top,
MDDNode bot)
|
protected MDDNode |
buildPoint(int[] values,
int valuesLen,
int arity,
MDDNode terminal,
MDDNode bot)
Constructs a point (minterm) in which a path along i =
values[i] leads to terminal , and all other assignments
lead to bot . |
MDDNode |
buildPoint(int[] values,
int arity,
MDDNode terminal,
MDDNode bot)
|
MDDNode |
buildPoint(int[] values,
MDDNode terminal,
MDDNode bot)
|
MDDNode |
buildVar(int var,
int arity,
int branch,
MDDNode value,
MDDNode bot)
|
MDDNode |
buildVar(int var,
int branch,
MDDNode value,
MDDNode bot)
|
MDDNode |
cofactor(MDDNode m,
int var,
int branch)
Restrict a specified variable to a certain value. |
MDDNode |
cofactor(MDDNode m,
MDDNode cube,
MDDNode background)
|
int[][] |
collectValues(MDDNode node)
|
java.util.Iterator |
cubeIterator(MDDNode node,
MDDNode background)
cubeIterator . |
int |
dagSize(MDDNode mddNode)
|
MDDLeafNode |
getLeafNode(int val)
Returns a cannonical version of a leaf node with value var . |
int |
getNvars()
Number of currently allocated variables. |
MDDNode |
kase(int var,
MDDNode[] children)
Creates a decision diagram with root var and children
children . |
MDDNode |
makeUnique(int level,
MDDNode[] children)
Returns the cannonical version of an MDDNode with root
level level and children children . |
java.util.Iterator |
mintermIterator(MDDNode node,
MDDNode background,
MDDNode vars,
int termVal)
|
MDDNode |
quantify(ApplyFunctions.QuantifyFunction function,
MDDNode node,
MDDNode cube)
performs universal/existentia/other quantification |
MDDNode |
renameVars(MDDNode mdd,
int[] newVars)
|
void |
renew()
Clears the computational cache. |
void |
setCaching(boolean v)
Toggles caching. |
int |
sharedSize(MDDNode[] mddNodes)
|
DaVinciGraph |
toDaVinci(MDDNode node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NO_VALUE
Constructor Detail |
---|
public MDDManager(int nvars, int _arity)
nvars
- initial number of variablesarity
- breadth factor of each DD nodeMethod Detail |
---|
public void renew()
public int getNvars()
int
valuepublic void setCaching(boolean v)
v
- a boolean
valuepublic MDDLeafNode getLeafNode(int val)
var
.
val
- value of the constant node
MDDLeafNode
valuepublic MDDNode kase(int var, MDDNode[] children)
var
and children
children
. The root node of each child is assumed to be
greater than var
. This is not checked!
var
- a NAME of the node to createchildren
- a MDDNode[]
value
MDDNode
valuepublic MDDNode makeUnique(int level, MDDNode[] children)
MDDNode
with root
level level
and children children
.
level
- level at the root of the treechildren
- array of children
MDDNode
value with level level
and children children
public MDDNode apply(ApplyFunctions.BinApplyFunction function, MDDNode m1, MDDNode m2)
public MDDNode apply(ApplyFunctions.UnaryApplyFunction function, MDDNode m1)
public MDDNode cofactor(MDDNode m, MDDNode cube, MDDNode background)
public MDDNode cofactor(MDDNode m, int var, int branch)
public MDDNode quantify(ApplyFunctions.QuantifyFunction function, MDDNode node, MDDNode cube)
public MDDNode renameVars(MDDNode mdd, int[] newVars)
public MDDNode buildVar(int var, int branch, MDDNode value, MDDNode bot)
public MDDNode buildVar(int var, int arity, int branch, MDDNode value, MDDNode bot)
public MDDNode buildCube(int[] vars, MDDNode top, MDDNode bot)
public MDDNode buildCube(int[] vars, int arity, MDDNode top, MDDNode bot)
public MDDNode buildPoint(int[] values, MDDNode terminal, MDDNode bot)
public MDDNode buildPoint(int[] values, int arity, MDDNode terminal, MDDNode bot)
protected MDDNode buildPoint(int[] values, int valuesLen, int arity, MDDNode terminal, MDDNode bot)
i =
values[i]
leads to terminal
, and all other assignments
lead to bot
.
values
- an int[]
valuearity
- an int
valueterminal
- a MDDNode
valuebot
- a MDDNode
value
MDDNode
valuepublic int dagSize(MDDNode mddNode)
public int sharedSize(MDDNode[] mddNodes)
public int[][] collectValues(MDDNode node)
public java.util.Iterator cubeIterator(MDDNode node, MDDNode background)
cubeIterator
.
Iterator
over the cubes of node
public java.util.Iterator mintermIterator(MDDNode node, MDDNode background, MDDNode vars, int termVal)
public DaVinciGraph toDaVinci(MDDNode node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |