edu.ucla.belief.recursiveconditioning
Class RCInferenceEngine

Object
  extended by AbstractInferenceEngine
      extended by RCInferenceEngine
All Implemented Interfaces:
EvidenceChangeListener, InferenceEngine, ChangeListener

public class RCInferenceEngine
extends AbstractInferenceEngine
implements InferenceEngine


Field Summary
 
Fields inherited from class AbstractInferenceEngine
DESCRIBE_CONDITIONAL, STR_CONSOLE_MESSAGE_COMP_MEM, STR_CONSOLE_MESSAGE_COMP_TIME, STR_CONSOLE_MESSAGE_PROP_TIME
 
Constructor Summary
RCInferenceEngine(RCDgraph rcdgraph, Dynamator dyn, BeliefNetwork beliefNetwork)
          Constructs a new RCInferenceEngine that wraps a RCDgraph.
 
Method Summary
 String compilationStatus(PropertySuperintendent bn)
           
 Table conditional(FiniteVariable var)
          Returns P(var | observations).
 void die()
           
 void evidenceChanged(EvidenceChangeEvent ECE)
          For interface EvidenceChangeListener.
 Table familyConditional(FiniteVariable var)
          Returns P(Family(var) | evidence) where Family(var) is the set containing var and its parents.
 Table familyJoint(FiniteVariable var)
          Returns P(Family(var),evidence) where Family(var) is the set containing var and its parents.
 double getValue()
           
 InferenceEngine handledClone(QuantitativeDependencyHandler handler)
           
 boolean isExhaustive()
           
 Table joint(FiniteVariable var)
          Returns P(var,observations).
 void printTables(PrintWriter out)
           
 double probability()
          Returns P(e).
 void setCPT(FiniteVariable var)
          This function tells the dgraph to clear all caches above where var's leaf node is.
 RCDgraph underlyingCompilation()
           
 Set variables()
          Returns the set of all of the variables.
 void warning(EvidenceChangeEvent ece)
          For interface EvidenceChangeListener
 
Methods inherited from class AbstractInferenceEngine
canonical, conditionals, describeConditionals, equals, getControlPanel, getDynamator, getEffectiveCPTData, getQuantitativeDependencyHandler, getValid, hashCode, isQuantitativeDependencyHandled, max, notoriousEdges, printInfoCompilation, printInfoPropagation, printTables, probabilityDisplayOperatorUnicode, probabilitySupported, random, setControlPanel, setDynamator, setQuantitativeDependencyHandler, settingChanged, setValid, test
 
Methods inherited from class Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface InferenceEngine
canonical, conditionals, describeConditionals, getControlPanel, getDynamator, getQuantitativeDependencyHandler, getValid, isQuantitativeDependencyHandled, max, notoriousEdges, printInfoCompilation, printInfoPropagation, probabilityDisplayOperatorUnicode, probabilitySupported, random, setControlPanel, setDynamator, setQuantitativeDependencyHandler, setValid
 

Constructor Detail

RCInferenceEngine

public RCInferenceEngine(RCDgraph rcdgraph,
                         Dynamator dyn,
                         BeliefNetwork beliefNetwork)
Constructs a new RCInferenceEngine that wraps a RCDgraph. It is intended to provide a convinient wrapper for RCDgraph which allows most of the common functions to be performed in a straight forward way. A given RCDgraph must be used with only one RCInferenceEngine since the inference engine modifies the state of the RCDgraph in the process of performing queries. Multiple engines would conflict and produce incorrect results.

Method Detail

compilationStatus

public String compilationStatus(PropertySuperintendent bn)
Specified by:
compilationStatus in interface InferenceEngine
Overrides:
compilationStatus in class AbstractInferenceEngine
Since:
20091226

die

public void die()
Specified by:
die in interface InferenceEngine
Overrides:
die in class AbstractInferenceEngine
Since:
20060321

handledClone

public InferenceEngine handledClone(QuantitativeDependencyHandler handler)
Specified by:
handledClone in interface InferenceEngine
Since:
061404

printTables

public void printTables(PrintWriter out)
Specified by:
printTables in interface InferenceEngine
Since:
061504

underlyingCompilation

public RCDgraph underlyingCompilation()

warning

public void warning(EvidenceChangeEvent ece)
For interface EvidenceChangeListener

Specified by:
warning in interface EvidenceChangeListener
Since:
071003

evidenceChanged

public void evidenceChanged(EvidenceChangeEvent ECE)
For interface EvidenceChangeListener.

Specified by:
evidenceChanged in interface EvidenceChangeListener

setCPT

public void setCPT(FiniteVariable var)
This function tells the dgraph to clear all caches above where var's leaf node is.

Specified by:
setCPT in interface InferenceEngine
Parameters:
var - The variable whose CPT we want to set.
vals - The values of the entries in the cpt.

probability

public double probability()
Returns P(e).

Specified by:
probability in interface InferenceEngine

joint

public Table joint(FiniteVariable var)
Returns P(var,observations).

Specified by:
joint in interface InferenceEngine

conditional

public Table conditional(FiniteVariable var)
Returns P(var | observations).

Specified by:
conditional in interface InferenceEngine

familyJoint

public Table familyJoint(FiniteVariable var)
Returns P(Family(var),evidence) where Family(var) is the set containing var and its parents.

Specified by:
familyJoint in interface InferenceEngine

familyConditional

public Table familyConditional(FiniteVariable var)
Returns P(Family(var) | evidence) where Family(var) is the set containing var and its parents.

Specified by:
familyConditional in interface InferenceEngine

getValue

public double getValue()

variables

public Set variables()
Returns the set of all of the variables.

Specified by:
variables in interface InferenceEngine

isExhaustive

public boolean isExhaustive()
Specified by:
isExhaustive in interface InferenceEngine


Copyright 2010 UCLA Automated Reasoning Group