edu.ucla.belief.io.dsl
Class GenieNetImpl
Object
BeliefNetworkImpl
GenieNetImpl
- All Implemented Interfaces:
- BeliefNetwork, GenieNet, PropertySuperintendent, DirectedGraph, Cloneable, Iterable, Collection
public class GenieNetImpl
- extends BeliefNetworkImpl
- implements GenieNet
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 |
Methods inherited from class BeliefNetworkImpl |
add, addAll, addAuditor, addEdge, addEdge, addVertex, checkValidProbabilities, clone, cloneAllCPTShells, contains, containsAll, containsEdge, countUserEnumProperties, deepClone, degree, equals, findVariables, fireAudit, forAll, forID, getAutoCPTInvalidation, getCopier, getEvidenceController, getMaxDomainCardinality, getMaxTheoreticalCPTSize, getMinDomainCardinality, getMinTheoreticalCPTSize, getProperties, getTheoreticalCPTSize, getUserEnumProperties, getUserObject, getUserObject2, hashCode, hasPath, identifierChanged, inComing, inDegree, induceGraph, induceGraph, insertState, isAcyclic, isEmpty, isSinglyConnected, isWeaklyConnected, isWeaklyConnected, iterator, maintainsAcyclicity, makeUserEnumProperties, minimalProperties, numEdges, outDegree, outGoing, propertiesAsArray, putAll, remove, removeAll, removeAuditor, removeEdge, removeEdge, removeEdge, removeEdgeNoCPTChanges, removeState, removeVertex, replaceAllPotentials, replaceVariables, replaceVertex, replaceVertices, retainAll, setAutoCPTInvalidation, setEvidenceController, setScalars, setUserEnumProperties, setUserEnumPropertiesModified, setUserObject, setUserObject2, shallowClone, size, tables, thereExists, thereExistsModifiedUserEnumProperty, toArray, toArray, topologicalOrder, vertices, writeToVCGFile |
Methods inherited from interface BeliefNetwork |
addAuditor, addEdge, checkValidProbabilities, clone, cloneAllCPTShells, countUserEnumProperties, deepClone, findVariables, fireAudit, forAll, forID, getAutoCPTInvalidation, getCopier, getEvidenceController, getMaxDomainCardinality, getMaxTheoreticalCPTSize, getMinDomainCardinality, getMinTheoreticalCPTSize, getTheoreticalCPTSize, getUserEnumProperties, identifierChanged, induceGraph, insertState, makeUserEnumProperties, propertiesAsArray, removeAuditor, removeEdge, removeState, replaceAllPotentials, setAutoCPTInvalidation, setEvidenceController, setScalars, setUserEnumProperties, setUserEnumPropertiesModified, shallowClone, tables, thereExists, 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, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray |
FLAG_DEBUG
public static boolean FLAG_DEBUG
GenieNetImpl
public GenieNetImpl()
GenieNetImpl
public GenieNetImpl(Map mapVariablesToPotentials)
newFiniteVariable
public FiniteVariable newFiniteVariable(Map properties)
- Specified by:
newFiniteVariable
in interface BeliefNetwork
- Overrides:
newFiniteVariable
in class BeliefNetworkImpl
- Since:
- 20080219
mayContain
public boolean mayContain(Object obj)
- Specified by:
mayContain
in interface BeliefNetwork
- Overrides:
mayContain
in class BeliefNetworkImpl
toString
public String toString()
- Overrides:
toString
in class BeliefNetworkImpl
- Since:
- 061002
seededClone
public BeliefNetwork seededClone(Map variablesOldToNew)
- GenieNet's primary responsibility as of 061002 is to
keep track of which variables belong to which submodels.
Call this method as part of deep cloning a BeliefNetwork,
to ask for a new GenieNetImpl that keeps track of the new
variables.
- Specified by:
seededClone
in interface BeliefNetwork
- Overrides:
seededClone
in class BeliefNetworkImpl
- Parameters:
variablesOldToNew
- A mapping from Variables this GenieNetImpl knows about
to the new Variables you would like the cloned GenieNetImpl to know about.- Since:
- 061002
replaceVariables
public void replaceVariables(Map variablesOldToNew,
NodeLinearTask task)
- Specified by:
replaceVariables
in interface BeliefNetwork
- Overrides:
replaceVariables
in class BeliefNetworkImpl
- Since:
- 20021001
clear
public void clear()
- Specified by:
clear
in interface Collection
- Overrides:
clear
in class BeliefNetworkImpl
- Since:
- 20051114
getVariables
public Collection getVariables(DSLSubmodel forModel)
- Specified by:
getVariables
in interface GenieNet
- Since:
- 041902
getDeepVariables
public Set getDeepVariables(DSLSubmodel forModel)
- The first call is expensive.
- Specified by:
getDeepVariables
in interface GenieNet
- Since:
- 050202
isAnscestor
public boolean isAnscestor(DSLSubmodel forModel,
Variable var)
- The first call is expensive.
- Specified by:
isAnscestor
in interface GenieNet
- Since:
- 050202
addDeepVariables
public void addDeepVariables(Collection ret,
DSLSubmodel forModel)
- Recusively traverse submodel tree rooted at forModel and add all variables to ret.
- Specified by:
addDeepVariables
in interface GenieNet
- Parameters:
forModel
- The root of the submodel tree to traverse.ret
- The Collection to which all variables will be added.- Since:
- 050202
getDSLSubmodelFactory
public DSLSubmodelFactory getDSLSubmodelFactory()
- Specified by:
getDSLSubmodelFactory
in interface GenieNet
addVariable
public boolean addVariable(Variable var,
boolean createCPT)
- Description copied from class:
BeliefNetworkImpl
- Adds a new node to the graph, with no parents. The CPT
created will be uniform.
- Specified by:
addVariable
in interface BeliefNetwork
- Overrides:
addVariable
in class BeliefNetworkImpl
removeVariable
public boolean removeVariable(Variable var)
- Description copied from class:
BeliefNetworkImpl
- 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
- Overrides:
removeVariable
in class BeliefNetworkImpl
setParams
public void setParams(Map inputParams)
- Sets the net parameters to the name value pairs contained in params.
- Specified by:
setParams
in interface GenieNet
Copyright 2010 UCLA Automated Reasoning Group