public class MDDManagerProxy extends Object implements MDDManager
getProxy method.
For convenience, MDDManager offers a wrapper method: getManager().| Modifier and Type | Method and Description |
|---|---|
boolean[] |
collectDecisionVariables(int node)
Collect variables on which a MDD depends.
|
String |
dumpMDD(int node)
Write a raw text representation of the MDD
|
MDDVariable |
ensureVariable(Object key,
byte nbval)
get a variable, create it if needed.
|
void |
free(int pos)
Free a node.
|
MDDVariable[] |
getAllVariables()
Get all MDDVariables in this manager.
|
int |
getChild(int node,
int value)
Get a specific child for a node.
|
int[] |
getChildren(int node)
Get all the children of a given node.
|
int |
getLeafCount()
Get the number of leaves
|
MDDManager |
getManager(List<?> order)
Get a new manager for this MDD Store, using a custom variable order.
|
VariableEffect[] |
getMultivaluedVariableEffect(MDDVariable var,
int node)
Determine the effect of a given variable on a MDD.
|
int |
getNodeCount() |
MDDVariable |
getNodeVariable(int n)
Get the variable associated to a given node.
|
static MDDManager |
getProxy(MDDStore store,
List<?> customOrder) |
NodeRelation |
getRelation(int first,
int other)
Determine the relation between two nodes.
|
int |
getSign(int node,
MDDVariable pivot)
Infer the effect of a variable in a given MDD.
|
VariableEffect |
getVariableEffect(MDDVariable var,
int node)
Determine the effect of a given variable on a MDD.
|
MDDVariable |
getVariableForKey(Object key)
Get the MDDVariable associated to a given key.
|
int |
getVariableIndex(MDDVariable var)
Get the position of a given variable in this manager's list of variables.
|
byte |
groupReach(int node,
byte[] values)
Get the value reached by a group of paths.
|
boolean |
isleaf(int node) |
boolean |
isView(MDDManager ddm) |
int |
mnot(int node,
int v)
Multi-valued not: flip leaves 0 and v.
|
int |
nodeFromState(byte[] state,
int value)
Create a MDD representing a state.
|
int |
nodeFromStates(Collection<byte[]> states,
int value)
Create a MDD representing a group of states.
|
int |
not(int node)
Logical not, performed by flipping leaves 0 and 1.
|
int |
parseDump(String s)
Create a MDD from a dumped structure
|
byte |
reach(int node,
byte[] values)
Find the leaf reached for a given variable assignment
|
int |
use(int node)
Mark a node as used.
|
public static MDDManager getProxy(MDDStore store, List<?> customOrder)
public byte reach(int node,
byte[] values)
MDDManagerreach in interface MDDManagerpublic byte groupReach(int node,
byte[] values)
MDDManagergroupReach in interface MDDManagerpublic MDDVariable getVariableForKey(Object key)
MDDManagergetVariableForKey in interface MDDManagerpublic int nodeFromState(byte[] state,
int value)
MDDManagernodeFromState in interface MDDManagerpublic int nodeFromStates(Collection<byte[]> states, int value)
MDDManagernodeFromStates in interface MDDManagerpublic int getVariableIndex(MDDVariable var)
MDDManagergetVariableIndex in interface MDDManagergetAllVariables().public MDDVariable[] getAllVariables()
MDDManagergetAllVariables in interface MDDManagerpublic MDDVariable ensureVariable(Object key, byte nbval)
MDDManagerensureVariable in interface MDDManagerpublic MDDManager getManager(List<?> order)
MDDManagergetManager in interface MDDManagerorder - requested variable order.this if the order is the same)public MDDVariable getNodeVariable(int n)
MDDManagergetNodeVariable in interface MDDManagern - the node IDpublic void free(int pos)
MDDManager
This should be used for each node id that was obtained through one of the get_?node() method,
or for the one explicitly marked as used.
Note that the space will be made available for new nodes, but it will NOT be returned to the garbage collector.
free in interface MDDManageruse(int),
get_bnode(int, int, int),
get_mnode(int, int[])public int use(int node)
MDDManagerfree(int) when you release it.use in interface MDDManagerpublic boolean isleaf(int node)
isleaf in interface MDDManagernode - the ID of the tested node.public int getChild(int node,
int value)
MDDManagergetChild in interface MDDManagernode - id of a nodevalue - assignment valuepublic int[] getChildren(int node)
MDDManagergetChildren in interface MDDManagerpublic int not(int node)
MDDManagernot in interface MDDManagerpublic int mnot(int node,
int v)
MDDManagermnot in interface MDDManagerv - the positive valuepublic NodeRelation getRelation(int first, int other)
MDDManagergetRelation in interface MDDManagerpublic int getNodeCount()
getNodeCount in interface MDDManagerpublic int getLeafCount()
MDDManagergetLeafCount in interface MDDManagerpublic int getSign(int node,
MDDVariable pivot)
MDDManagergetSign in interface MDDManagernode - the MDDpivot - the variable of interestpublic boolean[] collectDecisionVariables(int node)
MDDManagercollectDecisionVariables in interface MDDManagerpublic VariableEffect getVariableEffect(MDDVariable var, int node)
MDDManagergetVariableEffect in interface MDDManagerpublic VariableEffect[] getMultivaluedVariableEffect(MDDVariable var, int node)
MDDManagergetMultivaluedVariableEffect in interface MDDManagerpublic boolean isView(MDDManager ddm)
isView in interface MDDManagerpublic String dumpMDD(int node)
MDDManagerdumpMDD in interface MDDManagerpublic int parseDump(String s) throws ParseException
MDDManagerparseDump in interface MDDManagers - the string representing the MDD structureParseExceptionCopyright © 2009–2020. All rights reserved.