|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.model.extendedbn.ExtendedBNList
public class ExtendedBNList
This class encapsulates a List of ExtendedBNs and provides extra utility methods for accessing the ExtendedBNs in the underlying List.
Field Summary | |
---|---|
protected int |
lengthOfProgressableTask
Represnts the progress of any operation which is currently being monitored in this class. |
protected int |
progress
Represnts the length of the operation which is currently being monitored in this class. |
static int |
PROGRESSABLE_RECALC_NPTS
To indicate we are monitoring the ReCalculate all NPT's operation. |
protected boolean |
progressableTaskDone
When set to true the current task being monitored will have been completed. |
protected boolean |
terminateProgressableTask
When set to true the current operation can be cancelled/terminated. |
static double |
version
|
Fields inherited from interface uk.co.agena.minerva.util.model.Writable |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
ExtendedBNList()
Creates an empty ExtendedBNList. |
|
ExtendedBNList(java.util.List extendedBns)
Creates an ExtendedBNList containing the supplied List of ExtendedBNs. |
Method Summary | |
---|---|
int |
addExtendedBN(ExtendedBN extendedBN,
boolean assignUnquieID)
Adds the supplied ExtendedBN to this ExtendedBNList. |
int[] |
addExtendedBNs(java.util.List extendedBNs)
Adds the supplied ExtendedBNs to this ExtendedBNList. |
void |
clearUnpropagatedEvidence()
Clears all unpropagated evidence from the extendedbns in the list |
void |
compileAllExtendedBNs(boolean fireUpExtendedNodeEvents)
Compiles all the ExtendedBNs in the list. |
boolean |
contains(ExtendedBN ebn)
Checks if the argument ExtendedBN is contained in this list of ExtendedBNs |
int[] |
getAllExtendedBNIds()
Returns an array of IDs for all the extenededBNs in this list. |
java.util.List |
getAllExtendedNodes()
Returns a List of all ExtendedNodes in all stored ExtendedBNs. |
int |
getCurrentProgress()
|
ExtendedBN |
getExtendedBN(int id)
Retrieves the ExtendedBN with the supplied ID. |
java.util.List |
getExtendedBN(int[] ids,
boolean excludeDuplicates)
This methos will return a list of extended BNs which have the Id's in the provided list. |
ExtendedBN |
getExtendedBNAtIndex(int index)
|
java.util.List |
getExtendedBNs()
Returns the List of all ExtendedBNs in this ExtendedBNList. |
java.util.List |
getExtendedBNsThatShareThisCore(uk.co.agena.minerva.model.corebn.CoreBN coreBN)
This method id responsible for returning all the ExtendedBns that share the same CoreBN, as that specified in the argument list. |
java.util.List |
getExtendedBnsWithDDNodes()
Returns a list of exBns that contain 1 or more DD nodes |
java.util.List |
getExtendedBnsWithRankedNodes()
Returns a list of exBns that contain 1 or more Ranked nodes |
java.util.List |
getExtendedBnsWithStatisticalNodes()
Returns a list of exBns that contain 1 or more statistical function nodes |
ExtendedBN |
getExtendedBNThatContainsNode(ExtendedNode exNode)
This method will return the extended BN that contains the specified node |
ExtendedBN |
getExtendedBNWithName(java.lang.String name)
|
ExtendedNode |
getExtendedNodeFromExtendedBN(int exBNID,
int exnID)
Returns the ExtendedNode with the given id from the ExtendedBN with the specified id. |
ExtendedNode |
getExtendedNodeWithName(java.lang.String name)
Returns the ExtendedNode with the given short name if the node exists |
int |
getHighestAllocatedExtendedBNID()
Returns the highest ID currently allocated to the ExtendedBNs in this List.. |
int |
getLengthOfProgressableTask()
|
double |
getVersion()
Returns the version of the class. |
boolean |
isProgressableTaskDone()
|
void |
propagateAllExtendedBNs(boolean fireUpExtendedNodeEvents)
Propagates all the ExtendedBNs in the list. |
int |
read(java.util.List strings,
int currentLineNumber)
|
void |
regenerateNPTforEveryExtendedNode(boolean autoAdjustStateRanges)
Re-generates the NPT for every node in every BN using the formulae defined for that node.. |
void |
reinitiliseAllEvidenceOnAllExtendedBNs(boolean fireUpExtendedNodeEvents)
Re-initlise all ExtendedBNs, that is, multiply back in all their NPTs to build new cliques and sepsets and message pass to make consistent. |
void |
removeAllConnBNs()
Removes the CoreBNs connected to each ExtendedBN in the List from memory. |
ExtendedBN |
removeExtendedBN(int id)
Removes the ExtendedBN with the supplied ID if it is found. |
void |
resetProgressableTask()
Should be invoked at the end of the task to reset all required attributes used in the monitoring of the task. |
void |
retractAllEvidenceOnAllExtendedBNs(boolean fireUpExtendedNodeEvents)
Retracts all evidence from all the ExtendedBNs in the list. |
void |
setProgressableTaskDone(boolean done)
|
void |
setVersion(double version)
Sets the version number of the class. |
int |
size()
Returns the size of the ExtendedBNList. |
void |
terminateProgressableTask()
Invoked when the user has requested the task to be terminated. |
void |
updateCurrentProgress(int inc)
Increment the currentProgress by the specified value. |
java.util.List |
write()
Writes the object in question to a List of Strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double version
public static final int PROGRESSABLE_RECALC_NPTS
protected int lengthOfProgressableTask
protected int progress
protected boolean progressableTaskDone
protected boolean terminateProgressableTask
Constructor Detail |
---|
public ExtendedBNList()
public ExtendedBNList(java.util.List extendedBns)
extendedBns
- the ExtendedBNs that will be in the ExtendedBNListMethod Detail |
---|
public double getVersion()
Writable
getVersion
in interface Writable
public void setVersion(double version)
Writable
setVersion
in interface Writable
version
- the version numberpublic int size()
public int addExtendedBN(ExtendedBN extendedBN, boolean assignUnquieID)
extendedBN
- the ExtendedBN to add to the ExtendedBNListpublic int[] addExtendedBNs(java.util.List extendedBNs)
extendedBNs
- the ExtendedBNs to add to the ExtendedBNListpublic ExtendedBN removeExtendedBN(int id) throws ExtendedBNNotFoundException
id
- the ID of the ExtendedBN that will be removed from the ExtendedBNList
ExtendedBNNotFoundException
- if the ExtendedBN does not exist in the ExtendedBNListpublic ExtendedBN getExtendedBN(int id) throws ExtendedBNNotFoundException
id
- the ID of the ExtendedBN to be retrieved from the ExtendedBNList
ExtendedBNNotFoundException
- if the ExtendedBN does not exist in the ExtendedBNListpublic ExtendedBN getExtendedBNAtIndex(int index)
public ExtendedBN getExtendedBNWithName(java.lang.String name)
public java.util.List getExtendedBN(int[] ids, boolean excludeDuplicates)
ids
-
public java.util.List getExtendedBNs()
public void compileAllExtendedBNs(boolean fireUpExtendedNodeEvents) throws ExtendedBNException, InconsistentEvidenceException
ExtendedBNException
- if there is a problem during compilation
InconsistentEvidenceException
public void propagateAllExtendedBNs(boolean fireUpExtendedNodeEvents) throws ExtendedBNException
ExtendedBNException
- if there is a a problem during propagationpublic void retractAllEvidenceOnAllExtendedBNs(boolean fireUpExtendedNodeEvents) throws ExtendedBNException, InconsistentEvidenceException
ExtendedBNException
- if there is a problem during evidence retraction
InconsistentEvidenceException
public void reinitiliseAllEvidenceOnAllExtendedBNs(boolean fireUpExtendedNodeEvents) throws ExtendedBNException, InconsistentEvidenceException
ExtendedBNException
- if there is a problem reinitialising
InconsistentEvidenceException
public void removeAllConnBNs()
public ExtendedBN getExtendedBNThatContainsNode(ExtendedNode exNode)
exNode
-
public ExtendedNode getExtendedNodeFromExtendedBN(int exBNID, int exnID) throws ExtendedNodeNotFoundException
exBNID
- The id of the ExtendedBN the ExtendedNode belongs to.exnID
- The id of the ExtendedNode
ExtendedNodeNotFoundException
public ExtendedNode getExtendedNodeWithName(java.lang.String name)
name
- The name of the required node
public java.util.List getExtendedBnsWithDDNodes()
public java.util.List getExtendedBnsWithRankedNodes()
public java.util.List getExtendedBnsWithStatisticalNodes()
public java.util.List getAllExtendedNodes()
public void regenerateNPTforEveryExtendedNode(boolean autoAdjustStateRanges) throws ExtendedBNException, MinervaRangeException, InconsistentEvidenceException, NPTGeneratorInsufficientStateRangeException, NPTGeneratorException
ExtendedBNException
MinervaRangeException
InconsistentEvidenceException
NPTGeneratorInsufficientStateRangeException
NPTGeneratorException
public boolean contains(ExtendedBN ebn)
ebn
-
public java.util.List write() throws MinervaReadWriteException
Writable
write
in interface Writable
MinervaReadWriteException
- if therepublic int read(java.util.List strings, int currentLineNumber) throws MinervaReadWriteException
read
in interface Writable
MinervaReadWriteException
public int[] getAllExtendedBNIds()
public int getHighestAllocatedExtendedBNID()
public void clearUnpropagatedEvidence() throws ExtendedBNException
ExtendedBNException
public int getCurrentProgress()
getCurrentProgress
in interface Progressable
public int getLengthOfProgressableTask()
getLengthOfProgressableTask
in interface Progressable
public void terminateProgressableTask()
terminateProgressableTask
in interface Progressable
public boolean isProgressableTaskDone()
isProgressableTaskDone
in interface Progressable
public void setProgressableTaskDone(boolean done)
done
- The status of the done flag which should be set to indicate the task is over whether is has been terminated or finished.public void resetProgressableTask()
resetProgressableTask
in interface Progressable
public void updateCurrentProgress(int inc)
inc
- The amount by which we are updating the Current Progress.public java.util.List getExtendedBNsThatShareThisCore(uk.co.agena.minerva.model.corebn.CoreBN coreBN)
coreBN
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |