Package hec.hecmath.computation
Class MathOperation
java.lang.Object
hec.hecmath.computation.MathOperation
- All Implemented Interfaces:
Constants,Evaluable,Updatable,UpdatableListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface hec.hecmath.computation.Constants
Constants.LogicTestOperator, Constants.MathOperator, Constants.Notation, Constants.Precedence, Constants.QualityOperator, Constants.QualityTestOperator, Constants.TextOperator, Constants.TextTestOperator, Constants.ValueTestOperator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected static booleanprotected Evaluable[]protected booleanprotected static booleanprotected static Map<Constants.MathOperator,String> protected Constants.MathOperatorprotected static Map<String,Constants.MathOperator> protected booleanprotected booleanprotected static booleanprotected Set<UpdatableListener>protected Objectprotected Objectprotected double -
Constructor Summary
ConstructorsConstructorDescriptionMathOperation(Constants.MathOperator op, boolean persistent, Evaluable... args) MathOperation(Constants.MathOperator op, boolean persistent, List<? extends Evaluable> args) MathOperation(Constants.MathOperator op, Evaluable... args) MathOperation(Constants.MathOperator op, List<? extends Evaluable> args) MathOperation(String name, boolean persistent, Evaluable... args) MathOperation(String name, boolean persistent, List<? extends Evaluable> args) MathOperation(String name, Evaluable... args) MathOperation(String name, List<? extends Evaluable> args) -
Method Summary
Modifier and TypeMethodDescriptionstatic intstatic Stringprotected voidcompute()voiddoubleevaluate()booleanstatic booleanbooleanstatic booleangetName()getNames()intbooleanstatic booleanstatic booleanisMathOperation(String name) booleanisStale()protected static doublevoidstatic intprecedence(String name) protected static doublequantile(Evaluable[] l, int subsets, int position, boolean exceptionOnUndefined, boolean tolerateUndefined) voidvoidregisterListener(UpdatableListener listener) voidsetAllowDenormal(boolean setting) static voidsetAllowDenormalByDefault(boolean setting) voidsetExceptionOnUndefined(boolean setting) static voidsetExceptionOnUndefinedByDefault(boolean setting) voidsetTolerateUndefined(boolean setting) static voidsetTolerateUndefinedByDefault(boolean setting) toNotation(Constants.Notation notation) toString()voidvoidvoidunregisterListener(UpdatableListener listener)
-
Field Details
-
tolerateUndefinedByDefault
protected static boolean tolerateUndefinedByDefault -
exceptionOnUndefinedByDefault
protected static boolean exceptionOnUndefinedByDefault -
allowDenormalByDefault
protected static boolean allowDenormalByDefault -
nameByOp
-
opByName
-
value
protected double value -
op
-
stale
protected boolean stale -
args
-
tolerateUndefined
protected boolean tolerateUndefined -
exceptionOnUndefined
protected boolean exceptionOnUndefined -
allowDenormal
protected boolean allowDenormal -
updateListeners
-
updateListenersLock
-
updateSources
-
updateSourcesLock
-
-
Constructor Details
-
MathOperation
- Throws:
ComputationException
-
MathOperation
- Throws:
ComputationException
-
MathOperation
public MathOperation(Constants.MathOperator op, List<? extends Evaluable> args) throws ComputationException - Throws:
ComputationException
-
MathOperation
- Throws:
ComputationException
-
MathOperation
public MathOperation(String name, boolean persistent, List<? extends Evaluable> args) throws ComputationException - Throws:
ComputationException
-
MathOperation
public MathOperation(String name, boolean persistent, Evaluable... args) throws ComputationException - Throws:
ComputationException
-
MathOperation
public MathOperation(Constants.MathOperator op, boolean persistent, List<? extends Evaluable> args) throws ComputationException - Throws:
ComputationException
-
MathOperation
public MathOperation(Constants.MathOperator op, boolean persistent, Evaluable... args) throws ComputationException - Throws:
ComputationException
-
-
Method Details
-
getNames
-
isMathOperation
-
arity
-
precedence
-
arityName
-
getTolerateUndefinedByDefault
public static boolean getTolerateUndefinedByDefault() -
setTolerateUndefinedByDefault
public static void setTolerateUndefinedByDefault(boolean setting) -
getExceptionOnUndefinedByDefault
public static boolean getExceptionOnUndefinedByDefault() -
setExceptionOnUndefinedByDefault
public static void setExceptionOnUndefinedByDefault(boolean setting) -
getAllowDenormalByDefault
public static boolean getAllowDenormalByDefault() -
setAllowDenormalByDefault
public static void setAllowDenormalByDefault(boolean setting) -
quantile
protected static double quantile(Evaluable[] l, int subsets, int position, boolean exceptionOnUndefined, boolean tolerateUndefined) throws ComputationException - Throws:
ComputationException
-
mode
protected static double mode(Evaluable[] l, boolean exceptionOnUndefined, boolean tolerateUndefined) throws ComputationException - Throws:
ComputationException
-
registerListener
- Specified by:
registerListenerin interfaceUpdatable
-
unregisterListener
- Specified by:
unregisterListenerin interfaceUpdatable
-
notifyListeners
public void notifyListeners()- Specified by:
notifyListenersin interfaceUpdatable
-
registerAsListener
- Specified by:
registerAsListenerin interfaceUpdatableListener
-
unregisterAsListener
- Specified by:
unregisterAsListenerin interfaceUpdatableListener
-
unregisterAsListener
public void unregisterAsListener()- Specified by:
unregisterAsListenerin interfaceUpdatableListener
-
dataUpdated
- Specified by:
dataUpdatedin interfaceUpdatableListener
-
getName
-
getPrecedence
public int getPrecedence() -
isStale
public boolean isStale() -
evaluate
- Specified by:
evaluatein interfaceEvaluable- Throws:
ComputationException
-
evaluateToString
- Specified by:
evaluateToStringin interfaceEvaluable- Throws:
ComputationException
-
getTolerateUndefined
public boolean getTolerateUndefined()- Specified by:
getTolerateUndefinedin interfaceEvaluable
-
getExceptionOnUndefined
public boolean getExceptionOnUndefined()- Specified by:
getExceptionOnUndefinedin interfaceEvaluable
-
getAllowDenormal
public boolean getAllowDenormal()- Specified by:
getAllowDenormalin interfaceEvaluable
-
setTolerateUndefined
public void setTolerateUndefined(boolean setting) - Specified by:
setTolerateUndefinedin interfaceEvaluable
-
setExceptionOnUndefined
public void setExceptionOnUndefined(boolean setting) - Specified by:
setExceptionOnUndefinedin interfaceEvaluable
-
setAllowDenormal
public void setAllowDenormal(boolean setting) - Specified by:
setAllowDenormalin interfaceEvaluable
-
toString
-
toNotation
- Specified by:
toNotationin interfaceEvaluable- Throws:
ComputationException
-
compute
- Throws:
ComputationException
-