edu.ucla.belief
Interface BeliefNetwork

All Superinterfaces:
Cloneable, Collection, DirectedGraph, Iterable
All Known Subinterfaces:
GenieNet, HuginNet
All Known Implementing Classes:
BeliefNetworkImpl, GenieNetImpl, HuginNetImpl

public interface BeliefNetwork
extends DirectedGraph, Cloneable

Encapsulates information necessary to specify a belief network. A belief network consists of a Directed graph whose nodes are the Variables defining the structure of the network, and a mapping from Variable to Table representing the CPT of that variable.


Nested Class Summary
static interface BeliefNetwork.Auditor
           
 
Method Summary
 boolean addAuditor(BeliefNetwork.Auditor auditor)
           
 boolean addEdge(Variable from, Variable to, boolean expandCPT)
          Adds an edge to the belief network.
 boolean addVariable(Variable newNode, boolean createCPT)
          Adds a new node to the graph, with no parents.
 boolean checkValidProbabilities()
           
 Object clone()
           
 void cloneAllCPTShells()
           
 int countUserEnumProperties()
           
 BeliefNetwork deepClone()
           
 Collection findVariables(EnumProperty property, EnumValue value)
           
 BeliefNetwork fireAudit(Variable from, Variable to, Collection targets, BeliefNetwork.Auditor.Deed deed)
           
 boolean forAll(EnumProperty property, EnumValue value)
           
 Variable forID(String name)
          Returns the variable with the name supplied.
 boolean getAutoCPTInvalidation()
           
 Copier getCopier()
           
 EvidenceController getEvidenceController()
           
 int getMaxDomainCardinality()
           
 int getMaxTheoreticalCPTSize()
           
 int getMinDomainCardinality()
           
 int getMinTheoreticalCPTSize()
           
 int getTheoreticalCPTSize(FiniteVariable fVar)
           
 Collection getUserEnumProperties()
           
 void identifierChanged(String oldID, Variable var)
           
 void induceGraph(Map mapVariablesToPotentials)
           
 boolean insertState(FiniteVariable var, int index, Object instance)
           
 void makeUserEnumProperties(Map params)
           
 boolean mayContain(Object obj)
           
 FiniteVariable newFiniteVariable(Map properties)
           
 EnumProperty[] propertiesAsArray()
           
 boolean removeAuditor(BeliefNetwork.Auditor auditor)
           
 boolean removeEdge(Variable from, Variable to, boolean forget)
          Removes an edge from the network.
 Object removeState(FiniteVariable var, int index)
           
 boolean removeVariable(Variable var)
          Removes a variable from the network.
 void replaceAllPotentials(Map mapVariablesToPotentials)
           
 void replaceVariables(Map variablesOldToNew, NodeLinearTask task)
           
 BeliefNetwork seededClone(Map variablesOldToNew)
           
 void setAutoCPTInvalidation(boolean flag)
           
 void setEvidenceController(EvidenceController EC)
           
 void setScalars(double scalar)
           
 void setUserEnumProperties(Collection userProperties)
           
 void setUserEnumPropertiesModified(boolean flag)
           
 BeliefNetwork shallowClone()
           
 Collection tables()
           
 boolean thereExists(EnumProperty property, EnumValue value)
           
 boolean thereExistsModifiedUserEnumProperty()
           
 
Methods inherited from interface DirectedGraph
addEdge, addVertex, contains, containsEdge, degree, hasPath, inComing, inDegree, isAcyclic, isSinglyConnected, isWeaklyConnected, isWeaklyConnected, maintainsAcyclicity, numEdges, outDegree, outGoing, removeEdge, removeVertex, replaceVertex, replaceVertices, size, topologicalOrder, vertices
 
Methods inherited from interface Collection
add, addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray
 

Method Detail

newFiniteVariable

FiniteVariable newFiniteVariable(Map properties)
Since:
20080219

propertiesAsArray

EnumProperty[] propertiesAsArray()

countUserEnumProperties

int countUserEnumProperties()

getUserEnumProperties

Collection getUserEnumProperties()

setUserEnumProperties

void setUserEnumProperties(Collection userProperties)

makeUserEnumProperties

void makeUserEnumProperties(Map params)

forAll

boolean forAll(EnumProperty property,
               EnumValue value)

thereExists

boolean thereExists(EnumProperty property,
                    EnumValue value)

findVariables

Collection findVariables(EnumProperty property,
                         EnumValue value)

setAutoCPTInvalidation

void setAutoCPTInvalidation(boolean flag)

getAutoCPTInvalidation

boolean getAutoCPTInvalidation()

thereExistsModifiedUserEnumProperty

boolean thereExistsModifiedUserEnumProperty()

setUserEnumPropertiesModified

void setUserEnumPropertiesModified(boolean flag)

setScalars

void setScalars(double scalar)
Since:
072903

mayContain

boolean mayContain(Object obj)
Since:
100202

induceGraph

void induceGraph(Map mapVariablesToPotentials)
Since:
100302

replaceAllPotentials

void replaceAllPotentials(Map mapVariablesToPotentials)
Since:
100402

cloneAllCPTShells

void cloneAllCPTShells()
Since:
022503

getEvidenceController

EvidenceController getEvidenceController()

setEvidenceController

void setEvidenceController(EvidenceController EC)

getCopier

Copier getCopier()
Since:
021804

clone

Object clone()
Specified by:
clone in interface DirectedGraph

deepClone

BeliefNetwork deepClone()

seededClone

BeliefNetwork seededClone(Map variablesOldToNew)

shallowClone

BeliefNetwork shallowClone()

replaceVariables

void replaceVariables(Map variablesOldToNew,
                      NodeLinearTask task)

identifierChanged

void identifierChanged(String oldID,
                       Variable var)

addAuditor

boolean addAuditor(BeliefNetwork.Auditor auditor)
Since:
20091124

removeAuditor

boolean removeAuditor(BeliefNetwork.Auditor auditor)
Since:
20091124

fireAudit

BeliefNetwork fireAudit(Variable from,
                        Variable to,
                        Collection targets,
                        BeliefNetwork.Auditor.Deed deed)
Since:
20091124

addEdge

boolean addEdge(Variable from,
                Variable to,
                boolean expandCPT)
Adds an edge to the belief network. Both variables must already be part of the network, and it must leave the graph acyclic. The CPT will be expanded to include the new parent, and the values set will be independant of it. The relations for the other parents will remain as they were before.


removeEdge

boolean removeEdge(Variable from,
                   Variable to,
                   boolean forget)
Removes an edge from the network. If argument 'forget' is true, the resulting CPT for the variable to is formed from taking the original CPT and summing out the from variable.


addVariable

boolean addVariable(Variable newNode,
                    boolean createCPT)
Adds a new node to the graph, with no parents. The CPT created will be uniform.


removeVariable

boolean removeVariable(Variable var)
Removes a variable from the network. Any children of that variable are first disconnected by calling removeEdge(var,child).


getMaxDomainCardinality

int getMaxDomainCardinality()

getMinDomainCardinality

int getMinDomainCardinality()

getTheoreticalCPTSize

int getTheoreticalCPTSize(FiniteVariable fVar)

getMaxTheoreticalCPTSize

int getMaxTheoreticalCPTSize()

getMinTheoreticalCPTSize

int getMinTheoreticalCPTSize()

insertState

boolean insertState(FiniteVariable var,
                    int index,
                    Object instance)

removeState

Object removeState(FiniteVariable var,
                   int index)

checkValidProbabilities

boolean checkValidProbabilities()
Since:
060602

tables

Collection tables()
Since:
042902

forID

Variable forID(String name)
Returns the variable with the name supplied.



Copyright 2010 UCLA Automated Reasoning Group