|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.util.nptgenerator.Function
uk.co.agena.minerva.util.nptgenerator.Arithmetic
public class Arithmetic
Field Summary | |
---|---|
protected static double |
DELTA
|
static java.lang.String |
displayName
|
static java.lang.String[] |
parameterDisplayNames
|
Fields inherited from class uk.co.agena.minerva.util.nptgenerator.Function |
---|
ALLOWED_CHARACTERS, NEWLINE, TAB, VARIANCE_MAP, WEIGHTED_FUNCTIONS |
Method Summary | |
---|---|
static Arithmetic |
Arithmetic(ExtendedNode extendedNode,
java.util.List parents,
java.util.List functionParams)
Will Generate a Arithmetic NPT using the node and its parent nodes. |
static double[] |
Arithmetic(java.util.List ranges,
double value)
calculates the arithmetic variable. |
void |
calculateProbability(DataSet values)
This will calculate the arithmetic function and add it to the relevant cell of the npt using the rowMajorParentStateCombIndex. |
java.lang.String |
getDisplayName()
Shows the name of the Function subclass as it should be displayed in a GUI etc. |
java.lang.String[] |
getParameterDisplayNames()
Shows the name of the parameters of the Function subclass as they should be displayed in a GUI etc. |
void |
setExactProbabilityOnState(double statevalue)
This method is added for http://bugzilla.agena.co.uk/show_bug.cgi?id=2309 It will find the state that has the exact state value (hopefully a discrete point, and enter probability value 1 for it. |
java.lang.String |
toString()
Returns a String representation of the object. |
Methods inherited from class uk.co.agena.minerva.util.nptgenerator.Function |
---|
calculateFunction, createFunction, evaluateExpressionAsDouble, evaluateExpressionAsObject, generateNPTForNodeWithoutSampling, getDummyWeightedFunctionFromTrueName, getMaximumValueReached, getMinimumValueReached, getSingleColumnNPT, isForceSampling, requiresSampling, resetParserCache, setForceSampling, setMaximumValueReached, setMinimumValueReached, setPossibleMaxOrMinVaule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final double DELTA
public static java.lang.String displayName
public static java.lang.String[] parameterDisplayNames
Method Detail |
---|
public static Arithmetic Arithmetic(ExtendedNode extendedNode, java.util.List parents, java.util.List functionParams) throws NPTGeneratorException, InconsistentEvidenceException
ebn
- extendedFunctionNode
- expression
-
NPTGeneratorException
InconsistentEvidenceException
public void calculateProbability(DataSet values) throws ExtendedBNException, NPTGeneratorInsufficientStateRangeException, NPTGeneratorException
calculateProbability
in class Function
rowMajorParentStateCombIndex
- values
-
NPTGeneratorException
ExtendedBNException
NPTGeneratorInsufficientStateRangeException
public static double[] Arithmetic(java.util.List ranges, double value)
ranges
- mean
- variance
-
public java.lang.String toString()
toString
in class Function
The
- String representation.public java.lang.String getDisplayName()
Function
getDisplayName
in class Function
public java.lang.String[] getParameterDisplayNames()
Function
getParameterDisplayNames
in class Function
public void setExactProbabilityOnState(double statevalue)
probability
- statevalue
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |