|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectRC
RCDgraph
public final class RCDgraph
This class represents "compiled" dgraph objects used in recursive conditioning (it is a set of dtree objects which can share structure).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class RC |
---|
RC.RCCounters, RC.RCCreationException, RC.RCCreationParams, RC.RCStats, RC.RCStats_All, RC.RCStats_Pe, RC.RecCondThreadListener |
Field Summary |
---|
Constructor Summary | |
---|---|
RCDgraph(RC.RCCreationParams params)
Warning: Using this constructor will not create the complete structure. |
|
RCDgraph(RC.RCCreationParams params,
CachingScheme cs,
CachingScheme.RCCreateListener listnr,
DecompositionStructureUtils.ParamsGraph crm_par)
Creates a new RCDgraph based on the parameters. |
Method Summary | |
---|---|
static Thread |
allocateRCDgraphInThread(RCDgraph dg,
CachingScheme cs,
CachingScheme.RCCreateListener listnr,
double seed_bestCost,
Map seed_cf)
|
boolean |
canComputeFamilyMarginals()
|
static Thread |
createRCDgraphInThread(RC.RCCreationParams params,
CachingScheme cs,
CachingScheme.RCCreateListener listnr,
DecompositionStructureUtils.ParamsGraph crm_par)
This will create a thread in which an RCDgraph will be created (by using the listnr parameter, the search for CacheSchemes can be monitored and stopped which will return the best result found so far (if the cachingScheme supports it). |
Table |
familyJoint(FiniteVariable var)
|
RCNode |
getAnyRoot()
|
RCIterator |
getIteratorRoots()
|
RCIteratorTraversal |
getIteratorTraversal()
|
RCIterator |
getIteratorTree()
Iterator only over the first root |
static String |
getStaticTagName()
|
String |
getTagName()
|
Table |
joint(FiniteVariable var)
|
double[] |
recCond_All()
Run Recursive conditioning P(e) for each root node (special for testing & output of timing/memory...). |
double[] |
recCond_All(boolean runAllRoots,
boolean runWithKB,
boolean runNoKB)
Run Recursive conditioning P(e) for each root node. |
void |
recCond_PreCompute()
Run RC for each root node to "precompute" the marginals. |
void |
reduceToOnlyMarginals(Collection varsOfInterest)
Reduce this graph to one which (possibly) has fewer roots, but can only compute variable marginals instead of being able to compute family marginals. |
void |
setRoots(Collection rts,
boolean callInit,
Map varToRoot,
boolean canComputeFamilyMarginals)
|
Map |
varToRoot()
|
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RCDgraph(RC.RCCreationParams params)
public RCDgraph(RC.RCCreationParams params, CachingScheme cs, CachingScheme.RCCreateListener listnr, DecompositionStructureUtils.ParamsGraph crm_par)
bn
- A valid BeliefNetwork to use.cs
- A valid CachingScheme to use.listnr
- A Listener or else null.scalar
- Usually 1.0, but for genetics can scale it (slowing down computations).useKB
- Uses UnitResolution in a KnowledgeBase during computations.
RCCreationException
- if could not create a RCDgraph.Method Detail |
---|
public void setRoots(Collection rts, boolean callInit, Map varToRoot, boolean canComputeFamilyMarginals)
public static Thread allocateRCDgraphInThread(RCDgraph dg, CachingScheme cs, CachingScheme.RCCreateListener listnr, double seed_bestCost, Map seed_cf)
public static Thread createRCDgraphInThread(RC.RCCreationParams params, CachingScheme cs, CachingScheme.RCCreateListener listnr, DecompositionStructureUtils.ParamsGraph crm_par)
It catches RCCreationException and will call rcCreateError() ------rcCreateDone(null) if that happens.
public boolean canComputeFamilyMarginals()
canComputeFamilyMarginals
in class RC
public RCIterator getIteratorRoots()
getIteratorRoots
in class RC
public RCIterator getIteratorTree()
getIteratorTree
in class RC
public RCIteratorTraversal getIteratorTraversal()
getIteratorTraversal
in class RC
public RCNode getAnyRoot()
getAnyRoot
in class RC
public Map varToRoot()
varToRoot
in class RC
public void reduceToOnlyMarginals(Collection varsOfInterest)
public void recCond_PreCompute()
RC
This is meant mostly for dgraphs, where the marginal is saved in the root. For a dtree, it will just fill up the caches, but not at the root node.
Note: It is possible for the returned value to be NaN if the network contains that in a cpt.
recCond_PreCompute
in class RC
public double[] recCond_All()
RC
Note: It is possible for the returned value to be NaN if the network contains that in a cpt.
recCond_All
in class RC
public double[] recCond_All(boolean runAllRoots, boolean runWithKB, boolean runNoKB)
Note: It is possible for the returned value to be NaN if the network contains that in a cpt.
public Table joint(FiniteVariable var)
public Table familyJoint(FiniteVariable var)
public String getTagName()
getTagName
in class RC
public static String getStaticTagName()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |