|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPrune
public class Prune
A class containing utility methods that assist code that wants to work with a pruned network.
Constructor Summary | |
---|---|
Prune()
|
Method Summary | |
---|---|
static HashMap |
idToVariableMap(BeliefNetwork bn)
Returns a map from id to variable for the given belief network. |
static HashSet |
image(Set s,
Map m)
Returns the image of the given set according to the given map. |
static BeliefNetwork |
prune(BeliefNetwork bn,
Set queryVars,
Map evidence,
Map oldToNew,
Map newToOld,
Set newQueryVars,
Map newEvidence)
Returns a copy of the given network pruned according to the given query variables and the given evidence. |
static HashMap |
renameInstantiation(Map pw,
Map m)
Renames the variables in the given instantiation. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Prune()
Method Detail |
---|
public static HashMap idToVariableMap(BeliefNetwork bn)
bn
- the given belief network.
public static HashSet image(Set s, Map m)
s
- the given set.m
- the given map.
public static HashMap renameInstantiation(Map pw, Map m)
pw
- the given instantiation.m
- the map from old variable to new variable.
public static BeliefNetwork prune(BeliefNetwork bn, Set queryVars, Map evidence, Map oldToNew, Map newToOld, Set newQueryVars, Map newEvidence)
bn
- the given network.queryVars
- the given query variables.evidence
- the given evidence.oldToNew
- on entry, an empty map; on exit, a map from the given
network's variables to those of the pruned copy.newToOld
- on entry, an empty map; on exit, a map from the pruned
copy's variables to those of the given network.newQueryVars
- upon entry, an empty set; upon exit, the set of
query variables in the pruned copy.newEvidence
- upon entry, an empty map; upon exit, the evidence of
the pruned copy.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |