uk.co.agena.minerva.model.extendedbn
Class BooleanEN
java.lang.Object
uk.co.agena.minerva.model.extendedbn.ExtendedNode
uk.co.agena.minerva.model.extendedbn.LabelledEN
uk.co.agena.minerva.model.extendedbn.BooleanEN
- All Implemented Interfaces:
- java.lang.Comparable, java.util.EventListener, ExtendedNodeListener, ExtendedStateListener, Identifiable, Nameable, Writable
public class BooleanEN
- extends LabelledEN
This class is used to represent nodes with just two states that correspond
to {true, false} or {yes, no}.
Fields inherited from class uk.co.agena.minerva.model.extendedbn.ExtendedNode |
actOnMarginalsChangedEvent, answerable, connBn, connectableInputNode, connectableOutputNode, connNodeId, CONTINUOUS_INTERVAL_E_N, CURRENT_FUNCTION_STRING, currentNodeFunction, currentParentModelNodeAltId, currentPartitionedModelNodeFunctions, currentPartitionedParentModelNodeAltIds, currentPartitionedParentModelNodes, DEFAULT_FUNCTION_STRING, defaultNodeFunction, defaultParentModelNodeAltId, defaultPartitionedModelNodeFunctions, defaultPartitionedParentModelNodeAltIds, defaultPartitionedParentModelNodes, DELTA, DISCRETE_REAL_E_N, EDITABLE_NODE_FUNCTION, EDITABLE_NPT, EDITABLE_PARENT_STATE_FUNCTIONS, extendedStates, functionMode, id, inputNodeReceivedMarginals, LABELLED_E_N, name, nptReCalcRequired, nptSynchronisedWithFormula, NUMERICAL_E_N, PROBS_NOT_EDITABLE, reportable, supportedFunctionTypes, targetValue, targetValuePresent, version, visible |
Methods inherited from class uk.co.agena.minerva.model.extendedbn.ExtendedNode |
addChild, addExpressionVariable, addExtendedNodeListener, addExtendedState, addExtendedState, addExtendedStates, addParent, cloneTypeSpecific, compareTo, constructExtraFieldString, containsFunctionOfType, containsOnlyStatisticalFunctions, copy, createDataPointFromExtendedState, cropFunctions, enterDistributionOfEvidence, enterDistributionOfEvidence, enterHardEvidence, enterHardEvidence, extendedNodeConnBNNotFound, extendedNodeConnNodeIdChanged, extendedNodeInconsistentEvidenceEntered, extendedNodeMarginalsChanged, extendedNodeNameDescriptionChanged, extendedNodeStateNameChanged, extendedNodeStatesReplaced, extendedNodeVariableAdded, extendedNodeVariableRemoved, extendedNodeVisibleAttributeChanged, extendedStateAdded, extendedStateNameDescriptionChanged, extendedStateRemoved, fireMarginalsChangedEvent, getActOnMarginalsChangedEvent, getAnswerable, getConcreteNodeName, getConcreteNodeType, getConcreteNodeTypeNames, getConnBn, getConnNodeId, getCoreBNNodeEquivalents, getCurrentNodeFunction, getCurrentParentModelNodeAltId, getCurrentPartitionedModelNodeFunctions, getCurrentPartitionedParentModelNodeAltIds, getCurrentPartitionedParentModelNodes, getDefaultNodeFunction, getDefaultParentModelNodeAltId, getDefaultPartitionedModelNodeFunctions, getDefaultPartitionedParentModelNodeAltIds, getDefaultPartitionedParentModelNodes, getExpression, getExpressionVariables, getExtendedState, getExtendedStateAtIndex, getExtendedStates, getExtendedStateShortNames, getExtendedStateWithName, getExtendedStateWithShortDesc, getFunctionMode, getHardEvidence, getId, getInputNodeRecivedMarginalsAsEvidenceDS, getLastSavedPriorIndex, getMarginals, getName, getNextExtendedStateId, getNodeType, getNotes, getNPT, getNPTPopulationMethodAsString, getNPTSize, getNumberOfStateCombsForModelNodes, getPartitionedExpressionModelNodes, getPartitionedExpressions, getReportable, getRowMajorNPT, getSavedPriors, getScaledTargetValue, getSuitableMessagePassingNodes, getSupportedFunctionTypes, getTargetValue, getTargetValueAsString, getTargetValueRange, getTargetValueRangeAsString, getTotalNumberOfExtendedFunctions, getVersion, getVisible, hasParents, isChangeStatesOnInputNodeIfRequired, isConnectableInputNode, isConnectableOutputNode, isInputNodeReceivedMarginals, isInputNodeRecivedMarginalsAsEvidence, isNptReCalcRequired, isNptSynchronisedWithFormula, isTargetValuePresent, isTemporaryNodeOrderFlag, mode, nodeChanged, processExtraFields, read, recalculateConnStateIndices, removeAllFurtherSavedPriors, removeExpressionVariable, removeExtendedNodeListener, replicateNodeStates, revert2savedPrior, savePrior, setActOnMarginalsChangedEvent, setAnswerable, setChangeStatesOnInputNodeIfRequired, setConnBn, setConnectableInputNode, setConnectableOutputNode, setConnNodeId, setCurrentNodeFunction, setCurrentParentModelNodeAltId, setCurrentPartitionedModelNodeFunctions, setCurrentPartitionedParentModelNodeAltIds, setCurrentPartitionedParentModelNodes, setDefaultNodeFunction, setDefaultParentModelNodeAltId, setDefaultPartitionedModelNodeFunctions, setDefaultPartitionedParentModelNodeAltIds, setDefaultPartitionedParentModelNodes, setExpression, setExpressionVariables, setExtendedStates, setExtendedStates, setFunctionMode, setId, setInputNodeReceivedMarginals, setInputNodeRecivedMarginalsAsEvidence, setInputNodeRecivedMarginalsAsEvidenceDS, setName, setNotes, setNPT, setNPT, setNPT, setNPTForSingleModelParentNode, setNptReCalcRequired, setNptSynchronisedWithFormula, setPartitionedExpressionModelNodes, setPartitionedExpressions, setReportable, setSavedPriors, setTargetValue, setTargetValueFromString, setTargetValuePresent, setTemporaryNodeOrderFlag, setupActionForMarginalsChangedEvent, setVersion, setVisible, storeFunctionsCorrectly, toString, updateConnNodeId, updateExpressionVariable, updateFunctionsParentConnNodeId, updateFunctionType, usedInCurrentExpression, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NEGATIVE_STATE_NAMES
protected static final java.lang.String[] NEGATIVE_STATE_NAMES
- List of possible negative names for Boolean states.
POSITIVE_STATE_NAMES
public static final java.lang.String[] POSITIVE_STATE_NAMES
- List of possible positive names for Boolean states.
defaultStateNames
protected static java.lang.String[][] defaultStateNames
BooleanEN
public BooleanEN()
- Creates a default BooleanEN.
BooleanEN
public BooleanEN(NameDescription name,
java.lang.String connNodeId,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
throws ExtendedBNException
- Parameters:
name
- connNodeId
- connBn
-
- Throws:
ExtendedBNException
BooleanEN
public BooleanEN(NameDescription name,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
throws ExtendedBNException
- Parameters:
name
- connBn
-
- Throws:
ExtendedBNException
configureDefaultExtendedStates
public void configureDefaultExtendedStates()
throws ExtendedStateException
- Sets up a default list of ExtendedStates for this node based on the default state names
for this class.
- Overrides:
configureDefaultExtendedStates
in class LabelledEN
- Throws:
ExtendedStateException
getDefaultStateNames
public static java.lang.String[][] getDefaultStateNames()
createExtendedStates
public java.util.List createExtendedStates(DataSet ds)
throws ExtendedStateException
- Description copied from class:
ExtendedNode
- Takes the supplied DataSet and uses it to generate a List of ExtendedStates
which are then returned. Each type of node can potentially use the DataSet
to generate states in a different. Implementations are provided lower down
in the hierarchy.
- Overrides:
createExtendedStates
in class LabelledEN
- Parameters:
ds
- the DataSet used for creating the ExtendedStates
- Returns:
- a List of created ExtendedStates
- Throws:
ExtendedStateException
createDataSetForExtendedStates
public DataSet createDataSetForExtendedStates()
throws ExtendedStateException
- Create a DatsSet from the Extended States of this node.
- Overrides:
createDataSetForExtendedStates
in class LabelledEN
- Returns:
-
- Throws:
ExtendedStateException
replaceState
public java.util.List replaceState(int index,
int numDivisions)
throws ExtendedStateException,
ExtendedNodeMethodNotSupportedException
- Takes the state at the specified index and replaces it with the required number of new states.
NOTE: No implementation supported for this type of node.
- Overrides:
replaceState
in class LabelledEN
- Parameters:
index
- the index of the state to splitnumDivisions
- the number of divisions it should be split into
- Returns:
- a List of the ExtendedStates that were created as part of the process
- Throws:
ExtendedStateException
ExtendedNodeMethodNotSupportedException
removeExtendedState
public int removeExtendedState(int extendedStateId)
throws ExtendedBNException,
ExtendedNodeMethodNotSupportedException
- Description copied from class:
ExtendedNode
- Removes the ExtendedState with the specified ID from the ExtendedNode's
List. And from the connected core. Returns the int index of where the
element was removed from.
- Overrides:
removeExtendedState
in class ExtendedNode
- Parameters:
extendedStateId
- the ID of the ExtendedState to be removed
- Throws:
ExtendedStateNotFoundException
- if an ExtendedState with the specified ID does not exist
ExtendedBNException
ExtendedNodeMethodNotSupportedException
createNewExtendedState
public ExtendedState createNewExtendedState(int index)
throws ExtendedBNException,
ExtendedNodeMethodNotSupportedException
- Description copied from class:
ExtendedNode
- Creates a new ExtendedState, all the way to the core. It will add the state
at the index specified. Give a -1 value if you wish the state to be added
to the end of the list of existing states.
- Overrides:
createNewExtendedState
in class LabelledEN
- Returns:
-
- Throws:
ExtendedBNException
ExtendedNodeMethodNotSupportedException
Copyright © 2006 Agena Ltd. All Rights Reserved.