edu.ucla.belief
Class DecisionShell

Object
  extended by DecisionShell
All Implemented Interfaces:
CPTShell, DecisionListener, Potential, Cloneable

public class DecisionShell
extends Object
implements CPTShell, DecisionListener

Since:
20050109
Author:
keith cascio

Constructor Summary
DecisionShell(DecisionTree tree)
           
 
Method Summary
 Object clone()
           
 void decisionEvent(DecisionEvent e)
          interface DecisionListener
 void ensureNonsingular()
           
 void expand(FiniteVariable var)
           
 void forget(Variable from)
           
 double getCP(int index)
           
 double getCP(int[] indices)
           
 double getCP(Map instantiations)
           
 double getCP(Object[] instantiations)
           
 double getCP(Object[] parentInstantiations, Object childInstatiation)
           
 double getCPScaled(int ind)
           
 double getCPScaled(int[] indices)
           
 Table getCPT()
           
 CPTParameter getCPTParameter(int index)
           
 CPTParameter getCPTParameter(int[] mindex)
           
 CPTParameter[] getCPTParameters()
           
 DecisionTree getDecisionTree()
           
 Set getRelevant(int[] indices)
           
 Set getRelevant(Map instantiations)
           
 Set getRelevant(Object[] instantiations)
           
 Set getRelevant(Object[] parentInstantiations, Object childInstatiation)
           
 FiniteVariable getVariable()
           
 TableIndex index()
           
 void insertState(int index)
           
 void multiplyInto(Table t2)
           
 void normalize()
           
 void parentStateInserted(FiniteVariable parent, int indexNewInstance)
           
 void parentStateRemoved(FiniteVariable parent, int indexRemovedInstance)
           
 int randomJointValueIndex(Map mapInstantions)
           
 void removeState(int index)
           
 void replaceVariables(Map old2new, boolean partial)
           
 double scalar()
           
 List variables()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecisionShell

public DecisionShell(DecisionTree tree)
Method Detail

decisionEvent

public void decisionEvent(DecisionEvent e)
interface DecisionListener

Specified by:
decisionEvent in interface DecisionListener

getDecisionTree

public DecisionTree getDecisionTree()

clone

public Object clone()
Specified by:
clone in interface Potential
Overrides:
clone in class Object

randomJointValueIndex

public int randomJointValueIndex(Map mapInstantions)
Specified by:
randomJointValueIndex in interface CPTShell

getVariable

public FiniteVariable getVariable()
Specified by:
getVariable in interface CPTShell

variables

public List variables()
Specified by:
variables in interface CPTShell
Specified by:
variables in interface Potential

getCPTParameters

public CPTParameter[] getCPTParameters()
Specified by:
getCPTParameters in interface CPTShell

getCPTParameter

public CPTParameter getCPTParameter(int index)
Specified by:
getCPTParameter in interface CPTShell

getCPTParameter

public CPTParameter getCPTParameter(int[] mindex)
Specified by:
getCPTParameter in interface CPTShell

ensureNonsingular

public void ensureNonsingular()
Specified by:
ensureNonsingular in interface CPTShell

normalize

public void normalize()
               throws Exception
Specified by:
normalize in interface CPTShell
Throws:
Exception

replaceVariables

public void replaceVariables(Map old2new,
                             boolean partial)
Specified by:
replaceVariables in interface CPTShell
partial - If true, then skip warnings about incomplete mapping.

multiplyInto

public void multiplyInto(Table t2)
Specified by:
multiplyInto in interface CPTShell

forget

public void forget(Variable from)
Specified by:
forget in interface CPTShell

expand

public void expand(FiniteVariable var)
Specified by:
expand in interface CPTShell

insertState

public void insertState(int index)
Specified by:
insertState in interface CPTShell

removeState

public void removeState(int index)
Specified by:
removeState in interface CPTShell

parentStateInserted

public void parentStateInserted(FiniteVariable parent,
                                int indexNewInstance)
Specified by:
parentStateInserted in interface CPTShell

parentStateRemoved

public void parentStateRemoved(FiniteVariable parent,
                               int indexRemovedInstance)
Specified by:
parentStateRemoved in interface CPTShell

index

public TableIndex index()
Specified by:
index in interface CPTShell

getCPT

public Table getCPT()
Specified by:
getCPT in interface CPTShell

scalar

public double scalar()
Specified by:
scalar in interface CPTShell

getCPScaled

public double getCPScaled(int ind)
Specified by:
getCPScaled in interface CPTShell

getCPScaled

public double getCPScaled(int[] indices)
Specified by:
getCPScaled in interface CPTShell

getCP

public double getCP(int index)
Specified by:
getCP in interface CPTShell

getCP

public double getCP(int[] indices)
Specified by:
getCP in interface CPTShell

getCP

public double getCP(Object[] instantiations)
Specified by:
getCP in interface CPTShell

getCP

public double getCP(Map instantiations)
Specified by:
getCP in interface CPTShell

getCP

public double getCP(Object[] parentInstantiations,
                    Object childInstatiation)
Specified by:
getCP in interface CPTShell

getRelevant

public Set getRelevant(int[] indices)
Specified by:
getRelevant in interface CPTShell

getRelevant

public Set getRelevant(Object[] instantiations)
Specified by:
getRelevant in interface CPTShell

getRelevant

public Set getRelevant(Map instantiations)
Specified by:
getRelevant in interface CPTShell

getRelevant

public Set getRelevant(Object[] parentInstantiations,
                       Object childInstatiation)
Specified by:
getRelevant in interface CPTShell


Copyright 2010 UCLA Automated Reasoning Group