|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.model.extendedbn.ExtendedNode
uk.co.agena.minerva.model.extendedbn.NumericalEN
uk.co.agena.minerva.model.extendedbn.ContinuousEN
uk.co.agena.minerva.model.extendedbn.IntegerIntervalEN
public class IntegerIntervalEN
This class is used to represent intervals that contain only integers; floating point numbers in between are ignored. e.g. {0 - 10, 10 - 20, 20 - 30}, where "0 - 10" contains the integers {0, 1, 2, 3,.... 9} etc.
Field Summary | |
---|---|
protected static java.lang.String[][] |
defaultStateNames
|
Fields inherited from class uk.co.agena.minerva.model.extendedbn.ContinuousEN |
---|
continueToDynamicallyDiscretise, ddRelativeSumWidthEntropyErrors, dynamicallyDiscretisable, entropyConvergenceThreshold, supportedFunctionTypes, uniformJustSet |
Fields inherited from interface uk.co.agena.minerva.util.model.Writable |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
IntegerIntervalEN()
Creates a default DiscreteRealEN. |
|
IntegerIntervalEN(NameDescription name,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
|
|
IntegerIntervalEN(NameDescription name,
java.lang.String connNodeId,
uk.co.agena.minerva.model.corebn.CoreBN connBn)
|
Method Summary | |
---|---|
void |
configureDefaultExtendedStates()
Sets up a default list of ExtendedStates for this node based on the default state names for this class. |
protected DataPoint |
createDataPointFromExtendedState(ExtendedState es,
double value)
Creates a DataPoint from the supplied ExtendedState and probability value. |
DataSet |
createDataSetForExtendedStates()
Create a DatsSet from the Extended States of this node. |
DataSet |
createDataSetFromNumericValue(double value,
NameDescription name)
Takes the supplied value and creates a DataSet (the first) of likelihood evidence based upon where the value falls with respect to the ExtendedNode's ExtendedStates. |
java.util.List |
createExtendedStates(DataSet ds)
Takes the supplied DataSet and uses it to generate a List of ExtendedStates which are then returned. |
void |
extendedNodeVariableRemoved(ExtendedNodeEvent ene,
Variable removedVarible)
Invoked when a Variable is removed from the ExtendedNodes VariableList. |
protected void |
fillArraysUsingAbsolutes(double[] xVals,
double[] pXs)
Fills the two specified arrays with numerical values and their associated probabilities using the node marginals. |
protected void |
fillArraysUsingIntervals(Range[] xIntervals,
double[] pXs)
Fills the two specified arrays with Ranges and their associated probabilities using the node marginals. |
static java.lang.String[][] |
getDefaultStateNames()
|
protected int |
getIndexOfStateThatContains(double value,
boolean upperBoundIsExclusive)
This method will always treat the upperbound as exclusive. |
double |
getLastBound()
Differs from the superclass method because the Range doesn't actually contain the last value. |
java.lang.Object |
getSamplesForState(int index,
boolean boundsOnly,
boolean asContinous)
Returns a set of samples from the range of the state in question. |
boolean |
isStateSplitable(int stateindex)
This method checks if the state at the given stateindex is splitable. |
protected java.util.List |
performSplit(Range rangeToSplit,
int numDivisions)
|
void |
replicateNodeStates(ExtendedNode states2copyNode)
This method will take the states from the argument extended node and copy them to this node. |
void |
setNameOfIntervalDataPoint(IntervalDataPoint idp)
|
void |
setNameOfStateUsingRange(ExtendedState es,
Range r)
|
Methods inherited from class uk.co.agena.minerva.model.extendedbn.NumericalEN |
---|
mean, median, percentile, standardDeviation, variance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String[][] defaultStateNames
Constructor Detail |
---|
public IntegerIntervalEN()
public IntegerIntervalEN(NameDescription name, java.lang.String connNodeId, uk.co.agena.minerva.model.corebn.CoreBN connBn) throws ExtendedBNException
name
- connNodeId
- connBn
-
ExtendedBNException
public IntegerIntervalEN(NameDescription name, uk.co.agena.minerva.model.corebn.CoreBN connBn) throws ExtendedBNException
name
- connBn
-
ExtendedBNException
Method Detail |
---|
public static java.lang.String[][] getDefaultStateNames()
public void configureDefaultExtendedStates() throws ExtendedStateException
configureDefaultExtendedStates
in class ExtendedNode
ExtendedStateException
public java.util.List createExtendedStates(DataSet ds) throws ExtendedStateNumberingException, ExtendedStateException
ExtendedNode
createExtendedStates
in class ExtendedNode
ds
- the DataSet used for creating the ExtendedStates
ExtendedStateNumberingException
ExtendedStateException
protected DataPoint createDataPointFromExtendedState(ExtendedState es, double value) throws ExtendedBNException
createDataPointFromExtendedState
in class ContinuousEN
es
- the ExtendedState whose information is used to create the DataPoint.value
- the probability value that will appear in the DataPoint
ExtendedBNException
- if there is a problem creating the DataPointpublic void replicateNodeStates(ExtendedNode states2copyNode) throws ExtendedBNException
replicateNodeStates
in class ExtendedNode
states2copyNode
-
ExtendedBNException
public void extendedNodeVariableRemoved(ExtendedNodeEvent ene, Variable removedVarible)
extendedNodeVariableRemoved
in interface ExtendedNodeListener
extendedNodeVariableRemoved
in class ExtendedNode
ene
- The ExtendedNode event.removedVarible
- The Variable that was removed.public java.lang.Object getSamplesForState(int index, boolean boundsOnly, boolean asContinous) throws ExtendedStateException
numberOfSamples
- the number of samples to takeindex
- the index of the state to sample
ExtendedStateNotFoundException
- if there is no state at the supplied index
ExtendedStateException
public DataSet createDataSetFromNumericValue(double value, NameDescription name) throws ExtendedBNException
ContinuousEN
createDataSetFromNumericValue
in class ContinuousEN
value
- the value entered as an observationname
- the name of the DataSet derived from the Scenario name
ExtendedBNException
- if there is a problem creating the DataSetprotected java.util.List performSplit(Range rangeToSplit, int numDivisions) throws MinervaRangeException
performSplit
in class ContinuousEN
MinervaRangeException
public void setNameOfStateUsingRange(ExtendedState es, Range r)
setNameOfStateUsingRange
in class ContinuousEN
public void setNameOfIntervalDataPoint(IntervalDataPoint idp)
setNameOfIntervalDataPoint
in class ContinuousEN
public DataSet createDataSetForExtendedStates() throws ExtendedStateException
createDataSetForExtendedStates
in class ContinuousEN
ExtendedStateException
protected int getIndexOfStateThatContains(double value, boolean upperBoundIsExclusive)
getIndexOfStateThatContains
in class ContinuousEN
value
- the value being sought
protected void fillArraysUsingAbsolutes(double[] xVals, double[] pXs) throws ExtendedBNException
fillArraysUsingAbsolutes
in class NumericalEN
xVals
- the array to be filled with numerical valuespXs
- the array to be filled with probabilities
ExtendedBNException
- if there is a problem accessing the marginals or looking up an ExtendedStateprotected void fillArraysUsingIntervals(Range[] xIntervals, double[] pXs) throws ExtendedBNException
fillArraysUsingIntervals
in class NumericalEN
xIntervals
- the array to be filled with RangespXs
- the array to be filled with probabilities
ExtendedBNException
- if there is a problem filling the arrayspublic double getLastBound()
getLastBound
in class ContinuousEN
public boolean isStateSplitable(int stateindex)
isStateSplitable
in class ContinuousEN
i
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |