Package hec.hecmath.computation
Class Computation
java.lang.Object
hec.hecmath.computation.Computation
- 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 boolean
protected static boolean
protected List<hec.hecmath.computation.Computation.ConditionalExpression>
protected boolean
protected static boolean
protected static Pattern
protected static Pattern
protected String
protected Variable
protected static Pattern
protected static Pattern
protected boolean
protected boolean
protected static boolean
protected Set<UpdatableListener>
protected Object
protected VariableSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
compute()
void
double
evaluate()
boolean
static boolean
boolean
static boolean
int
boolean
static boolean
static void
protected hec.hecmath.computation.Computation.ConditionalExpression
makeConditionalExpression
(String conditionText, String toDo) void
void
void
registerListener
(UpdatableListener listener) void
setAllowDenormal
(boolean setting) static void
setAllowDenormalByDefault
(boolean setting) void
setExceptionOnUndefined
(boolean setting) static void
setExceptionOnUndefinedByDefault
(boolean setting) protected void
setExpression
(String expr) void
setTolerateUndefined
(boolean setting) static void
setTolerateUndefinedByDefault
(boolean setting) toNotation
(Constants.Notation notation) toString()
void
void
void
unregisterListener
(UpdatableListener listener)
-
Field Details
-
tolerateUndefinedByDefault
protected static boolean tolerateUndefinedByDefault -
exceptionOnUndefinedByDefault
protected static boolean exceptionOnUndefinedByDefault -
allowDenormalByDefault
protected static boolean allowDenormalByDefault -
expand_when
-
expand_otherwise
-
split_when
-
split_otherwise
-
tolerateUndefined
protected boolean tolerateUndefined -
exceptionOnUndefined
protected boolean exceptionOnUndefined -
allowDenormal
protected boolean allowDenormal -
stale
protected boolean stale -
inputText
-
result
-
variables
-
updateSources
-
updateSourcesLock
-
updateListeners
-
computation
-
-
Constructor Details
-
Computation
protected Computation() -
Computation
- Throws:
ComputationException
-
-
Method Details
-
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) -
getTolerateUndefined
public boolean getTolerateUndefined()- Specified by:
getTolerateUndefined
in interfaceEvaluable
-
getExceptionOnUndefined
public boolean getExceptionOnUndefined()- Specified by:
getExceptionOnUndefined
in interfaceEvaluable
-
getAllowDenormal
public boolean getAllowDenormal()- Specified by:
getAllowDenormal
in interfaceEvaluable
-
setTolerateUndefined
public void setTolerateUndefined(boolean setting) - Specified by:
setTolerateUndefined
in interfaceEvaluable
-
setExceptionOnUndefined
public void setExceptionOnUndefined(boolean setting) - Specified by:
setExceptionOnUndefined
in interfaceEvaluable
-
setAllowDenormal
public void setAllowDenormal(boolean setting) - Specified by:
setAllowDenormal
in interfaceEvaluable
-
toString
-
evaluate
- Specified by:
evaluate
in interfaceEvaluable
- Throws:
ComputationException
-
evaluateToString
- Specified by:
evaluateToString
in interfaceEvaluable
- Throws:
ComputationException
-
getQuality
- Throws:
ComputationException
-
toNotation
- Specified by:
toNotation
in interfaceEvaluable
- Throws:
ComputationException
-
registerAsListener
- Specified by:
registerAsListener
in interfaceUpdatableListener
-
unregisterAsListener
- Specified by:
unregisterAsListener
in interfaceUpdatableListener
-
unregisterAsListener
public void unregisterAsListener()- Specified by:
unregisterAsListener
in interfaceUpdatableListener
-
dataUpdated
- Specified by:
dataUpdated
in interfaceUpdatableListener
-
compute
- Throws:
ComputationException
-
makeConditionalExpression
protected hec.hecmath.computation.Computation.ConditionalExpression makeConditionalExpression(String conditionText, String toDo) throws ComputationException - Throws:
ComputationException
-
setExpression
- Throws:
ComputationException
-
main
- Throws:
Exception
-
registerListener
- Specified by:
registerListener
in interfaceUpdatable
-
unregisterListener
- Specified by:
unregisterListener
in interfaceUpdatable
-
notifyListeners
public void notifyListeners()- Specified by:
notifyListeners
in interfaceUpdatable
-