Package eu.simuline.relana.model
Class ProbDistr
- java.lang.Object
-
- eu.simuline.relana.model.ProbDistr
-
public final class ProbDistr extends Object
Represents a probability distribution. Created: Mon Apr 25 00:33:44 2005- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classProbDistr.InverterEnumeration of inverters: the trivial inverter and the canonical inverter.(package private) static classProbDistr.ValidatorContains some information on validity and degeneracy of aProbDistrand also the fundamental figures to compute probabilities in case of validity and non-degenracy.
-
Field Summary
Fields Modifier and Type Field Description private Map<Deficiency,BigDecimal>def2probprivate TypetypeThe type of this ProbDistr.private Map<ProbDistr.Inverter,ProbDistr.Validator>validators
-
Constructor Summary
Constructors Constructor Description ProbDistr(Type type, Map<Deficiency,ProbDistr> old2ProbDistr, Map<Deficiency,BigDecimal> def2prob)ProbDistr(Type type, Map<Deficiency,BigDecimal> def2prob)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ProbDistradd(Deficiency def)private static voidcheckIn01(Map<Deficiency,BigDecimal> def2prob)BigDecimalgetProb(Deficiency def)private TypegetType()(package private) ProbDistr.ValidatorgetValidator(ProbDistr.Inverter inv)private ProbDistr.Validatorinit(ProbDistr.Inverter inv, Stack<Deficiency> minDefs, Set<DeficiencyNode> nMinNodes)Describeinitmethod here.(package private) ProbDistrremove(Deficiency def)StringtoString()voidvalidate()private voidvalidateUp(ProbDistr.Inverter inv)
-
-
-
Field Detail
-
type
private Type type
The type of this ProbDistr. Note that this is not updated by methods such asremove(eu.simuline.relana.model.Deficiency)oradd(eu.simuline.relana.model.Deficiency)but only set and used in the initialization process.
-
def2prob
private Map<Deficiency,BigDecimal> def2prob
-
validators
private Map<ProbDistr.Inverter,ProbDistr.Validator> validators
-
-
Constructor Detail
-
ProbDistr
public ProbDistr(Type type, Map<Deficiency,BigDecimal> def2prob)
-
ProbDistr
public ProbDistr(Type type, Map<Deficiency,ProbDistr> old2ProbDistr, Map<Deficiency,BigDecimal> def2prob)
-
-
Method Detail
-
checkIn01
private static void checkIn01(Map<Deficiency,BigDecimal> def2prob)
-
init
private ProbDistr.Validator init(ProbDistr.Inverter inv, Stack<Deficiency> minDefs, Set<DeficiencyNode> nMinNodes)
Describeinitmethod here.- Parameters:
inv- determines whether analysis is bottom up or top down. Here: just exchanges min and max.minDefs- Invoked with empty set; method collects the minimal Deficiencys.nMinNodes- Invoked with empty set; method collects sort of deep copies of the non-minimal DeficiencyNodes here.- Returns:
- a raw
Validatorfor this distribution. Here, raw means that nothing is done but invocation of the constructor.
-
getValidator
ProbDistr.Validator getValidator(ProbDistr.Inverter inv)
- Parameters:
inv- determines whether analysis is bottom up or top down.- Returns:
- a
Validator.
-
getType
private Type getType()
-
getProb
public BigDecimal getProb(Deficiency def)
-
validate
public void validate()
-
validateUp
private void validateUp(ProbDistr.Inverter inv)
-
remove
ProbDistr remove(Deficiency def)
-
add
ProbDistr add(Deficiency def)
-
-