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 class
ProbDistr.Inverter
Enumeration of inverters: the trivial inverter and the canonical inverter.(package private) static class
ProbDistr.Validator
Contains some information on validity and degeneracy of aProbDistr
and 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>
def2prob
private Type
type
The 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) ProbDistr
add(Deficiency def)
private static void
checkIn01(Map<Deficiency,BigDecimal> def2prob)
BigDecimal
getProb(Deficiency def)
private Type
getType()
(package private) ProbDistr.Validator
getValidator(ProbDistr.Inverter inv)
private ProbDistr.Validator
init(ProbDistr.Inverter inv, Stack<Deficiency> minDefs, Set<DeficiencyNode> nMinNodes)
Describeinit
method here.(package private) ProbDistr
remove(Deficiency def)
String
toString()
void
validate()
private void
validateUp(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)
Describeinit
method 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
Validator
for 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)
-
-