Class LogicalOperation
- java.lang.Object
-
- de.uka.ipd.sdq.stoex.analyser.operations.LogicalOperation
-
- Direct Known Subclasses:
AndOperation
,OrOperation
public abstract class LogicalOperation extends Object
Abstract class with interface for logical operations (AND, OR).
-
-
Constructor Summary
Constructors Constructor Description LogicalOperation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IProbabilityMassFunction
evaluate(Object left, Object right)
Evaluates two objects that represent the left-hand side and the right-hand side of a logical expression.protected double
findBooleanProbability(IProbabilityMassFunction left, boolean value)
Retrieves the probability of the given boolean value from the given Boolean PMF.protected IProbabilityMassFunction
getBoolPMF(boolean value)
Converts a boolean value to a boolean PMF.protected IProbabilityMassFunction
getBoolPMF(double trueProb)
Converts a probability into a boolean PMF.protected abstract IProbabilityMassFunction
getEvaluatedPMF(IProbabilityMassFunction left, IProbabilityMassFunction right)
protected IProbabilityMassFunction
getEvaluatedPMF(IProbabilityMassFunction left, Boolean right)
Evaluates a boolean value and a PMF.protected IProbabilityMassFunction
getEvaluatedPMF(Boolean left, IProbabilityMassFunction right)
Evaluates a boolean value and a PMF.protected IProbabilityMassFunction
getEvaluatedPMF(Boolean left, Boolean right)
Evaluates two boolean values.
-
-
-
Method Detail
-
evaluate
public IProbabilityMassFunction evaluate(Object left, Object right)
Evaluates two objects that represent the left-hand side and the right-hand side of a logical expression.- Parameters:
left
- left-hand side of expressionright
- right-hand side of expression- Returns:
- evaluation result
-
findBooleanProbability
protected double findBooleanProbability(IProbabilityMassFunction left, boolean value)
Retrieves the probability of the given boolean value from the given Boolean PMF.- Parameters:
left
-- Returns:
-
getBoolPMF
protected IProbabilityMassFunction getBoolPMF(boolean value)
Converts a boolean value to a boolean PMF.- Parameters:
value
-- Returns:
-
getBoolPMF
protected IProbabilityMassFunction getBoolPMF(double trueProb)
Converts a probability into a boolean PMF.- Parameters:
left
-right
-- Returns:
-
getEvaluatedPMF
protected IProbabilityMassFunction getEvaluatedPMF(Boolean left, Boolean right)
Evaluates two boolean values.
-
getEvaluatedPMF
protected IProbabilityMassFunction getEvaluatedPMF(Boolean left, IProbabilityMassFunction right)
Evaluates a boolean value and a PMF.
-
getEvaluatedPMF
protected IProbabilityMassFunction getEvaluatedPMF(IProbabilityMassFunction left, Boolean right)
Evaluates a boolean value and a PMF.
-
getEvaluatedPMF
protected abstract IProbabilityMassFunction getEvaluatedPMF(IProbabilityMassFunction left, IProbabilityMassFunction right)
-
-