edu.ucla.belief
Class BeliefNetworkImpl

Object
  extended by BeliefNetworkImpl
All Implemented Interfaces:
BeliefNetwork, PropertySuperintendent, DirectedGraph, Cloneable, Iterable, Collection
Direct Known Subclasses:
GenieNetImpl, HuginNetImpl

public class BeliefNetworkImpl
extends Object
implements BeliefNetwork, PropertySuperintendent

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
 
Nested classes/interfaces inherited from interface BeliefNetwork
BeliefNetwork.Auditor
 
Field Summary
static boolean FLAG_DEBUG
           
 UserObject userobject
           
 UserObject userobject2
           
 
Fields inherited from interface PropertySuperintendent
KEY_APPROXIMATED_PARENTS, KEY_EXCLUDEARRAY, KEY_EXCLUDEPOLICY, KEY_HUGIN_ID, KEY_HUGIN_LABEL, KEY_HUGIN_NAME, KEY_HUGIN_NODE_SIZE, KEY_HUGIN_POSITION, KEY_HUGIN_potential, KEY_HUGIN_potential_data, KEY_HUGIN_STATES, KEY_HUGIN_SUBTYPE, KEY_HUGINITY, KEY_IDS_RECOVERABLE_PARENTS, KEY_ISMAPVARIABLE, KEY_RECOVERABLES, KEY_SEENDEFAULTEVIDENCE, KEY_SOFT_EVIDENCE_CHILDREN, KEY_USERPROPERTIES, VALUE_PERMISSIVE, VALUE_STRICT, VALUE_TRUE
 
Constructor Summary
BeliefNetworkImpl()
           
BeliefNetworkImpl(BeliefNetworkImpl toCopy)
           
BeliefNetworkImpl(boolean construct)
          Creates an empty network.
BeliefNetworkImpl(DirectedGraph structure)
           
BeliefNetworkImpl(DirectedGraph structure, Map tables)
          Creates a belief network.
BeliefNetworkImpl(Map mapVariablesToPotentials)
          Creates a BeliefNetwork by inducing the graph structure from a mapping from the Variable to its CPT.
 
Method Summary
 boolean add(Object obj)
           
 boolean addAll(Collection p)
           
 boolean addAuditor(BeliefNetwork.Auditor auditor)
           
 boolean addEdge(Object vertex1, Object vertex2)
          Adds the directed edge to the graph(Optional operation).
 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 addVertex(Object vertex)
          Adds vertex to the graph(Optional operation).
 boolean checkValidProbabilities()
           
 void clear()
           
 Object clone()
          As of 061002, this method simply calls deepClone().
 void cloneAllCPTShells()
           
 boolean contains(Object vertex)
          Returns whether or not a particular Object is a vertex in the graph.
 boolean containsAll(Collection p)
           
 boolean containsEdge(Object vertex1, Object vertex2)
          Returns whether or not a particular edge is in the graph.
 int countUserEnumProperties()
           
 BeliefNetwork deepClone()
          Call this method to perform a deep clone on a BeliefNetworkImpl (i.e., will clone the structure, Tables and all Variable objects.
 int degree(Object vertex)
          Returns the degree of the vertex.
 boolean equals(Object p)
           
 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 id)
          Returns the variable with the id supplied
 boolean getAutoCPTInvalidation()
           
 Copier getCopier()
           
 EvidenceController getEvidenceController()
           
 int getMaxDomainCardinality()
           
 int getMaxTheoreticalCPTSize()
           
 int getMinDomainCardinality()
           
 int getMinTheoreticalCPTSize()
           
 Map getProperties()
           
 int getTheoreticalCPTSize(FiniteVariable fVar)
           
 Collection getUserEnumProperties()
           
 UserObject getUserObject()
           
 UserObject getUserObject2()
           
 int hashCode()
           
 boolean hasPath(Object vertex1, Object vertex2)
          Determines if there is a directed path from vertex1 to vertex2.
 void identifierChanged(String oldID, Variable var)
           
 Set inComing(Object vertex)
          Constructs an Iterator over the vertices adjacent to edges entering the specified vertex.
 int inDegree(Object vertex)
          Returns the number of edges entering the vertex.
 void induceGraph(Map mapVariablesToCPTShells)
           
 void induceGraph(Map mapVariablesToCPTShells, NodeLinearTask task)
           
 boolean insertState(FiniteVariable var, int index, Object instance)
           
 boolean isAcyclic()
          Determines whether or not the graph is acyclic.
 boolean isEmpty()
           
 boolean isSinglyConnected()
          Determines whether or not the graph is a singly connected.
 boolean isWeaklyConnected()
          Determines whether or not the graph is weakly connected.
 boolean isWeaklyConnected(Object vertex1, Object vertex2)
          Determines if there is an undirected path from vertex1 to vertex2.
 Iterator iterator()
           
 boolean maintainsAcyclicity(Object vertex1, Object vertex2)
           Check whether adding the proposed edge would keep the graph acyclic.
 void makeUserEnumProperties(Map inputParams)
           
 boolean mayContain(Object obj)
           
static Map minimalProperties(Map properties)
           
 FiniteVariable newFiniteVariable(Map properties)
           
 int numEdges()
           
 int outDegree(Object vertex)
          Returns the number of edges leaving the vertex.
 Set outGoing(Object vertex)
          Constructs an Iterator over the vertices adjacent to edges leaving the specified vertex.
 EnumProperty[] propertiesAsArray()
           
static void putAll(Map from, Map to)
           
 boolean remove(Object obj)
           
 boolean removeAll(Collection p)
           
 boolean removeAuditor(BeliefNetwork.Auditor auditor)
           
 boolean removeEdge(Object vertex1, Object vertex2)
          Removes the directed edge from the graph(Optional operation).
 boolean removeEdge(Variable from, Variable to)
          Removes an edge from the network.
 boolean removeEdge(Variable from, Variable to, boolean forget)
          Removes an edge from the network.
 boolean removeEdgeNoCPTChanges(Variable from, Variable to)
          Removes an edge from the network.
 Object removeState(FiniteVariable var, int index)
           
 boolean removeVariable(Variable var)
          Removes a variable from the network.
 boolean removeVertex(Object vertex)
          Removes vertex from the graph(Optional operation).
 void replaceAllPotentials(Map mapVariablesToPotentials)
           
 void replaceVariables(Map variablesOldToNew)
           
 void replaceVariables(Map variablesOldToNew, NodeLinearTask task)
           
 void replaceVertex(Object oldVertex, Object newVertex)
           
 void replaceVertices(Map verticesOldToNew, NodeLinearTask task)
           
 boolean retainAll(Collection p1)
           
 BeliefNetwork seededClone(Map variablesOldToNew)
           Call this method to clone a BeliefNetworkImpl when for whatever reason you have already cloned all the Variables it contains, and you have a mapping from the Variables it contains to Variables that you would like the cloned BeliefNetworkImpl to contain.
 void setAutoCPTInvalidation(boolean flag)
           
 void setEvidenceController(EvidenceController EC)
           
 void setScalars(double scalar)
           
 void setUserEnumProperties(Collection userProperties)
           
 void setUserEnumPropertiesModified(boolean flag)
           
 void setUserObject(UserObject obj)
           
 void setUserObject2(UserObject obj)
           
 BeliefNetwork shallowClone()
           
 int size()
          Returns the number of vertices in the graph.
 Collection tables()
           
 boolean thereExists(EnumProperty property, EnumValue value)
           
 boolean thereExistsModifiedUserEnumProperty()
           
 Object[] toArray()
           
 Object[] toArray(Object[] p)
           
 List topologicalOrder()
           
 String toString()
           
 Set vertices()
          Constructs an Iterator over all vertices.
 void writeToVCGFile(File file)
           
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FLAG_DEBUG

public static boolean FLAG_DEBUG

userobject

public UserObject userobject

userobject2

public UserObject userobject2
Constructor Detail

BeliefNetworkImpl

public BeliefNetworkImpl(boolean construct)
Creates an empty network. The structure and tables must be supplied before anything useful can be done.


BeliefNetworkImpl

public BeliefNetworkImpl(BeliefNetworkImpl toCopy)
Since:
110702

BeliefNetworkImpl

public BeliefNetworkImpl()

BeliefNetworkImpl

public BeliefNetworkImpl(Map mapVariablesToPotentials)
Creates a BeliefNetwork by inducing the graph structure from a mapping from the Variable to its CPT.


BeliefNetworkImpl

public BeliefNetworkImpl(DirectedGraph structure,
                         Map tables)
Creates a belief network.

Parameters:
structure - A directed graph specifying the structure of the network.
tables - - A mapping from the Variable to its CPT.

BeliefNetworkImpl

public BeliefNetworkImpl(DirectedGraph structure)
Method Detail

newFiniteVariable

public FiniteVariable newFiniteVariable(Map properties)
Specified by:
newFiniteVariable in interface BeliefNetwork
Since:
20080219

minimalProperties

public static Map minimalProperties(Map properties)
Since:
20080219

getUserObject

public UserObject getUserObject()

setUserObject

public void setUserObject(UserObject obj)

getUserObject2

public UserObject getUserObject2()

setUserObject2

public void setUserObject2(UserObject obj)

getProperties

public Map getProperties()
Specified by:
getProperties in interface PropertySuperintendent

putAll

public static void putAll(Map from,
                          Map to)
Since:
112603

forAll

public boolean forAll(EnumProperty property,
                      EnumValue value)
Specified by:
forAll in interface BeliefNetwork
Since:
101003

thereExists

public boolean thereExists(EnumProperty property,
                           EnumValue value)
Specified by:
thereExists in interface BeliefNetwork
Since:
101403

findVariables

public Collection findVariables(EnumProperty property,
                                EnumValue value)
Specified by:
findVariables in interface BeliefNetwork
Since:
101003

setAutoCPTInvalidation

public void setAutoCPTInvalidation(boolean flag)
Specified by:
setAutoCPTInvalidation in interface BeliefNetwork
Since:
102003

getAutoCPTInvalidation

public boolean getAutoCPTInvalidation()
Specified by:
getAutoCPTInvalidation in interface BeliefNetwork

countUserEnumProperties

public int countUserEnumProperties()
Specified by:
countUserEnumProperties in interface BeliefNetwork
Since:
010904

propertiesAsArray

public EnumProperty[] propertiesAsArray()
Specified by:
propertiesAsArray in interface BeliefNetwork

setUserEnumProperties

public void setUserEnumProperties(Collection userProperties)
Specified by:
setUserEnumProperties in interface BeliefNetwork

getUserEnumProperties

public Collection getUserEnumProperties()
Specified by:
getUserEnumProperties in interface BeliefNetwork

thereExistsModifiedUserEnumProperty

public boolean thereExistsModifiedUserEnumProperty()
Specified by:
thereExistsModifiedUserEnumProperty in interface BeliefNetwork
Since:
010804

setUserEnumPropertiesModified

public void setUserEnumPropertiesModified(boolean flag)
Specified by:
setUserEnumPropertiesModified in interface BeliefNetwork
Since:
010804

makeUserEnumProperties

public void makeUserEnumProperties(Map inputParams)
Specified by:
makeUserEnumProperties in interface BeliefNetwork

add

public final boolean add(Object obj)
Specified by:
add in interface Collection

remove

public final boolean remove(Object obj)
Specified by:
remove in interface Collection

retainAll

public boolean retainAll(Collection p1)
Specified by:
retainAll in interface Collection

toArray

public Object[] toArray(Object[] p)
Specified by:
toArray in interface Collection

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection

removeAll

public boolean removeAll(Collection p)
Specified by:
removeAll in interface Collection

clear

public void clear()
Specified by:
clear in interface Collection

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection
Overrides:
hashCode in class Object

addAll

public boolean addAll(Collection p)
Specified by:
addAll in interface Collection

containsAll

public boolean containsAll(Collection p)
Specified by:
containsAll in interface Collection

equals

public boolean equals(Object p)
Specified by:
equals in interface Collection
Overrides:
equals in class Object

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection

topologicalOrder

public List topologicalOrder()
Specified by:
topologicalOrder in interface DirectedGraph
Returns:
A List over the vertices of the graph, in topological order.

replaceVertex

public void replaceVertex(Object oldVertex,
                          Object newVertex)
Specified by:
replaceVertex in interface DirectedGraph

replaceVertices

public void replaceVertices(Map verticesOldToNew,
                            NodeLinearTask task)
Specified by:
replaceVertices in interface DirectedGraph

maintainsAcyclicity

public boolean maintainsAcyclicity(Object vertex1,
                                   Object vertex2)
Description copied from interface: DirectedGraph

Check whether adding the proposed edge would keep the graph acyclic.

Precondition: the graph is acyclic.

Specified by:
maintainsAcyclicity in interface DirectedGraph

vertices

public Set vertices()
Description copied from interface: DirectedGraph
Constructs an Iterator over all vertices.

Specified by:
vertices in interface DirectedGraph
Returns:
Iterator over all vertices.

inComing

public Set inComing(Object vertex)
Description copied from interface: DirectedGraph
Constructs an Iterator over the vertices adjacent to edges entering the specified vertex.

Precondition:
vertex is in the graph(tested by "equals").

Specified by:
inComing in interface DirectedGraph
Returns:
Iterator over the vertices adjacent to edges entering vertex.

outGoing

public Set outGoing(Object vertex)
Description copied from interface: DirectedGraph
Constructs an Iterator over the vertices adjacent to edges leaving the specified vertex.

Precondition:
vertex is in the graph(tested by "equals").

Specified by:
outGoing in interface DirectedGraph
Returns:
Iterator over the vertices adjacent to edges leaving vertex.

degree

public int degree(Object vertex)
Description copied from interface: DirectedGraph
Returns the degree of the vertex. This includes both in and out edges

Precondition:
vertex is in the graph(tested by "equals").

Specified by:
degree in interface DirectedGraph
Returns:
the number of vertices adjacent to vertex.

inDegree

public int inDegree(Object vertex)
Description copied from interface: DirectedGraph
Returns the number of edges entering the vertex.

Precondition:
vertex is in the graph(tested by "equals").

Specified by:
inDegree in interface DirectedGraph
Returns:
the number of edges entering the vertex.

outDegree

public int outDegree(Object vertex)
Description copied from interface: DirectedGraph
Returns the number of edges leaving the vertex.

Precondition:
vertex is in the graph(tested by "equals").

Specified by:
outDegree in interface DirectedGraph
Returns:
the number of edges leaving the vertex.

containsEdge

public boolean containsEdge(Object vertex1,
                            Object vertex2)
Description copied from interface: DirectedGraph
Returns whether or not a particular edge is in the graph. The edge leaves vertex1 and enters vertex2.

Precondition:
vertex1 and vertex2 are in the graph(tested by "equals").

Specified by:
containsEdge in interface DirectedGraph
Returns:
true if edge (vertex1,vertex2) is in the graph, false otherwise.

contains

public boolean contains(Object vertex)
Description copied from interface: DirectedGraph
Returns whether or not a particular Object is a vertex in the graph.

Specified by:
contains in interface DirectedGraph
Specified by:
contains in interface Collection
Returns:
true if vertex is in the graph(tested by "equals"), false otherwise.

size

public int size()
Description copied from interface: DirectedGraph
Returns the number of vertices in the graph.

Specified by:
size in interface DirectedGraph
Specified by:
size in interface Collection
Returns:
the number of vertices in the graph.

numEdges

public int numEdges()
Specified by:
numEdges in interface DirectedGraph

isAcyclic

public boolean isAcyclic()
Description copied from interface: DirectedGraph
Determines whether or not the graph is acyclic. Cycles are considered in the dirrected sense. Ex A->B,A->C,B->C is acyclic while A->B,B->C,C->A is not. It is equivalent to asking if it is a DAG. By convention the empty graph is connected.

Specified by:
isAcyclic in interface DirectedGraph
Returns:
false if the graph contains a cycle, true otherwise.

isWeaklyConnected

public boolean isWeaklyConnected()
Description copied from interface: DirectedGraph
Determines whether or not the graph is weakly connected. This is the same as asking if the undirected graph produced by eliminating the directionality of the edges is connected. By convention the empty graph is connected.

Specified by:
isWeaklyConnected in interface DirectedGraph
Returns:
true if the graph is connected, false otherwise.

isWeaklyConnected

public boolean isWeaklyConnected(Object vertex1,
                                 Object vertex2)
Description copied from interface: DirectedGraph
Determines if there is an undirected path from vertex1 to vertex2.

Precondition:
vertex1 and vertex2 are in the graph(tested by "equals").

Specified by:
isWeaklyConnected in interface DirectedGraph
Returns:
true if there is an undirected path from vertex1 to vertex2.

hasPath

public boolean hasPath(Object vertex1,
                       Object vertex2)
Description copied from interface: DirectedGraph
Determines if there is a directed path from vertex1 to vertex2.

Precondition:
vertex1 and vertex2 are in the graph(tested by "equals").

Specified by:
hasPath in interface DirectedGraph
Returns:
true if there is a directed path from vertex1 to vertex2.

isSinglyConnected

public boolean isSinglyConnected()
Description copied from interface: DirectedGraph
Determines whether or not the graph is a singly connected. A singly connected digraph is a directed graph in which there is exactly one undirected path between any two vertices. By convention the empty graph is singly connected.

Specified by:
isSinglyConnected in interface DirectedGraph
Returns:
true if the graph is a singly connected, false otherwise.

addVertex

public boolean addVertex(Object vertex)
Description copied from interface: DirectedGraph
Adds vertex to the graph(Optional operation). If the vertex is already a member of the graph, the graph is unchanged and the method returns false, following the Collection convention.

Postcondition:
vertex is in the graph(as tested by "equals").

Specified by:
addVertex in interface DirectedGraph
Returns:
true if the graph was modified(i.e. vertex was not a vertex already) false otherwise.

removeVertex

public boolean removeVertex(Object vertex)
Description copied from interface: DirectedGraph
Removes vertex from the graph(Optional operation). If the vertex is not a member of the graph, the method returns false and leaves the graph unchanged. If the parameter is a vertex of the graph, it is removed and the method returns true.

Postcondition:
vertex is not in the graph(as tested by "equals").

Specified by:
removeVertex in interface DirectedGraph

addEdge

public boolean addEdge(Object vertex1,
                       Object vertex2)
Description copied from interface: DirectedGraph
Adds the directed edge to the graph(Optional operation). If either of the vertices are not in the graph, they are added, and the edge is added. If the edge was already in the graph, it returns false, otherwise it returns true.

Postcondition:
the edge (vertex1,vertex2) is in the graph.

Specified by:
addEdge in interface DirectedGraph

removeEdge

public boolean removeEdge(Object vertex1,
                          Object vertex2)
Description copied from interface: DirectedGraph
Removes the directed edge from the graph(Optional operation). If the edge is not in the graph when the call is made, it returns false, otherwise it returns true.

Postcondition:
the edge (vertex1,vertex2) is in the graph.

Specified by:
removeEdge in interface DirectedGraph

mayContain

public boolean mayContain(Object obj)
Specified by:
mayContain in interface BeliefNetwork

setScalars

public void setScalars(double scalar)
Specified by:
setScalars in interface BeliefNetwork
Since:
072903

identifierChanged

public void identifierChanged(String oldID,
                              Variable var)
Specified by:
identifierChanged in interface BeliefNetwork

getEvidenceController

public EvidenceController getEvidenceController()
Specified by:
getEvidenceController in interface BeliefNetwork
Since:
071902

setEvidenceController

public void setEvidenceController(EvidenceController EC)
Specified by:
setEvidenceController in interface BeliefNetwork

replaceAllPotentials

public void replaceAllPotentials(Map mapVariablesToPotentials)
Specified by:
replaceAllPotentials in interface BeliefNetwork
Since:
100402

cloneAllCPTShells

public void cloneAllCPTShells()
Specified by:
cloneAllCPTShells in interface BeliefNetwork
Since:
20030225

insertState

public boolean insertState(FiniteVariable var,
                           int index,
                           Object instance)
Specified by:
insertState in interface BeliefNetwork
Since:
20021015

removeState

public Object removeState(FiniteVariable var,
                          int index)
Specified by:
removeState in interface BeliefNetwork
Since:
20021015

toString

public String toString()
Overrides:
toString in class Object
Since:
20020524

getCopier

public Copier getCopier()
Specified by:
getCopier in interface BeliefNetwork
Since:
021804

clone

public final Object clone()
As of 061002, this method simply calls deepClone().

Specified by:
clone in interface BeliefNetwork
Specified by:
clone in interface DirectedGraph
Overrides:
clone in class Object
Since:
052402

deepClone

public final BeliefNetwork deepClone()
Call this method to perform a deep clone on a BeliefNetworkImpl (i.e., will clone the structure, Tables and all Variable objects. )

Specified by:
deepClone in interface BeliefNetwork
Since:
060302

seededClone

public BeliefNetwork seededClone(Map variablesOldToNew)

Call this method to clone a BeliefNetworkImpl when for whatever reason you have already cloned all the Variables it contains, and you have a mapping from the Variables it contains to Variables that you would like the cloned BeliefNetworkImpl to contain.

NOTE: If the BeliefNetworkImpl points to a HuginNet "userobject", this method will clone that HuginNet also. You are not resposible for cloning the HuginNet yourself if you call this method.

Specified by:
seededClone in interface BeliefNetwork
Parameters:
variablesOldToNew - A mapping from variables this BeliefNetworkImpl contains to the new ones you would like the cloned BeliefNetworkImpl to contain.
Since:
061002

replaceVariables

public void replaceVariables(Map variablesOldToNew)
Since:
20021001

replaceVariables

public void replaceVariables(Map variablesOldToNew,
                             NodeLinearTask task)
Specified by:
replaceVariables in interface BeliefNetwork
Since:
20060519

shallowClone

public BeliefNetwork shallowClone()
Specified by:
shallowClone in interface BeliefNetwork
Since:
060402

addAuditor

public boolean addAuditor(BeliefNetwork.Auditor auditor)
Specified by:
addAuditor in interface BeliefNetwork
Since:
20091124

removeAuditor

public boolean removeAuditor(BeliefNetwork.Auditor auditor)
Specified by:
removeAuditor in interface BeliefNetwork
Since:
20091124

fireAudit

public BeliefNetwork fireAudit(Variable from,
                               Variable to,
                               Collection targets,
                               BeliefNetwork.Auditor.Deed deed)
Specified by:
fireAudit in interface BeliefNetwork
Since:
20091124

addEdge

public 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.

Specified by:
addEdge in interface BeliefNetwork

removeEdge

public boolean removeEdge(Variable from,
                          Variable to)
Removes an edge from the network. The resulting CPT for the variable to is formed from taking the original CPT and summing out the from variable.


removeEdge

public boolean removeEdge(Variable from,
                          Variable to,
                          boolean forget)
Description copied from interface: BeliefNetwork
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.

Specified by:
removeEdge in interface BeliefNetwork

removeEdgeNoCPTChanges

public boolean removeEdgeNoCPTChanges(Variable from,
                                      Variable to)
Removes an edge from the network.


addVariable

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

Specified by:
addVariable in interface BeliefNetwork

getMaxTheoreticalCPTSize

public int getMaxTheoreticalCPTSize()
Specified by:
getMaxTheoreticalCPTSize in interface BeliefNetwork
Since:
120704

getMinTheoreticalCPTSize

public int getMinTheoreticalCPTSize()
Specified by:
getMinTheoreticalCPTSize in interface BeliefNetwork
Since:
120704

getTheoreticalCPTSize

public int getTheoreticalCPTSize(FiniteVariable fVar)
Specified by:
getTheoreticalCPTSize in interface BeliefNetwork
Since:
120704

getMaxDomainCardinality

public int getMaxDomainCardinality()
Specified by:
getMaxDomainCardinality in interface BeliefNetwork
Since:
102902

getMinDomainCardinality

public int getMinDomainCardinality()
Specified by:
getMinDomainCardinality in interface BeliefNetwork
Since:
102902

removeVariable

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

Specified by:
removeVariable in interface BeliefNetwork

induceGraph

public void induceGraph(Map mapVariablesToCPTShells)
Specified by:
induceGraph in interface BeliefNetwork
Since:
20021003

induceGraph

public void induceGraph(Map mapVariablesToCPTShells,
                        NodeLinearTask task)
Since:
20060519

checkValidProbabilities

public boolean checkValidProbabilities()
Specified by:
checkValidProbabilities in interface BeliefNetwork
Since:
20020606

tables

public Collection tables()
Specified by:
tables in interface BeliefNetwork
Since:
20020429

forID

public Variable forID(String id)
Returns the variable with the id supplied

Specified by:
forID in interface BeliefNetwork

writeToVCGFile

public void writeToVCGFile(File file)
                    throws IOException
Throws:
IOException


Copyright 2010 UCLA Automated Reasoning Group