|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectRC2Utils
public class RC2Utils
This class contains utility functions for RC2 objects.
Nested Class Summary | |
---|---|
static class |
RC2Utils.MiscStats
|
Method Summary | |
---|---|
static Collection |
addAllNodes(RC2Node rt,
Collection ret)
Add rt and all descendants to ret (stops descending when any node is already in ret. |
static Collection |
calculateCutsetFromChildren(RC2NodeInternal nd,
Collection acutset)
Calculates the cutset of a variable based only on its children. |
static double |
collOfFinVarsToStateSpace(Collection col)
Will return the state space of all the variables in the collection, and if the collection is empty it will return 1. |
static void |
computeLeafs(RC2Node rt,
Collection ret)
Compute leaf nodes in the subtree rooted at rt (will include rt if it is a leaf node). |
static void |
computeParentsInTree(RC2Node rt,
Map ret)
When finished, ret will include a mapping from all nodes to their parents in the subtree rooted at rt. |
static RC2Utils.MiscStats |
computeStatsDtree(RC2 rc)
|
static void |
confirmUnitResolutionKB(RC2 rc,
BeliefNetwork bn)
If there is anything that is wrong, this will throw an IllegalStateException. |
static void |
confirmUnitResolutionRSAT(RC2 rc,
BeliefNetwork bn)
If there is anything that is wrong, this will throw an IllegalStateException. |
static double |
expectedRCCalls_All(RC2 rc,
Collection nodesCached)
If nodesCached is null, it will look to the nodes themselves to see if memory has been allocated, however if nodesCached is non-null, it will ignore the RC object and determine the number of calls based on nodesCached. |
static double |
expectedRCCalls_Pe_inclEvid(RC2 rc,
Collection nodesCached,
Collection evidNodes)
|
static double |
expectedRCCalls_Pe(RC2 rc,
Collection nodesCached)
If nodesCached is null, it will look to the nodes themselves to see if memory has been allocated, however if nodesCached is non-null, it will ignore the RC object and determine the number of calls based on nodesCached. |
static HashSet |
getSetOfAllCachedNodes(RC2 rc)
|
static Collection |
getSetOfAllNodes(RC2 rc)
|
static Collection |
getSetOfAllNonLeafNodes(RC2 rc)
|
static double |
logsub(double lna,
double lnb)
Compute ln(a-b) from ln(a) and ln(b) using the log sub equation. |
static double |
logsub2(double lna,
double lnb)
Compute ln(a-b) from ln(a) and ln(b) using the log sub equation. |
static void |
printRC2(PrintStream out,
RC2 rc)
|
static void |
printRC2(PrintWriter out,
RC2 rc)
|
static void |
writeDtreeToVCGFile(File outFile,
RC2 rc)
|
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final void computeParentsInTree(RC2Node rt, Map ret)
public static final void computeLeafs(RC2Node rt, Collection ret)
public static final Collection addAllNodes(RC2Node rt, Collection ret)
public static final Collection calculateCutsetFromChildren(RC2NodeInternal nd, Collection acutset)
public static final double collOfFinVarsToStateSpace(Collection col)
public static final double logsub(double lna, double lnb)
public static final double logsub2(double lna, double lnb)
public static final Collection getSetOfAllNodes(RC2 rc)
public static final Collection getSetOfAllNonLeafNodes(RC2 rc)
public static final HashSet getSetOfAllCachedNodes(RC2 rc)
public static final double expectedRCCalls_All(RC2 rc, Collection nodesCached)
public static final double expectedRCCalls_Pe(RC2 rc, Collection nodesCached)
public static final void printRC2(PrintStream out, RC2 rc)
public static final void printRC2(PrintWriter out, RC2 rc)
public static final void writeDtreeToVCGFile(File outFile, RC2 rc) throws IOException
IOException
public static void confirmUnitResolutionRSAT(RC2 rc, BeliefNetwork bn)
public static void confirmUnitResolutionKB(RC2 rc, BeliefNetwork bn)
public static RC2Utils.MiscStats computeStatsDtree(RC2 rc)
public static final double expectedRCCalls_Pe_inclEvid(RC2 rc, Collection nodesCached, Collection evidNodes)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |