Package eu.simuline.relana.model
Class FlatCInstance
- java.lang.Object
-
- eu.simuline.relana.model.FlatCInstance
-
public final class FlatCInstance extends Object
Instance of Component. Created: Thu Apr 14 23:02:05 2005- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FlatCInstance.InstDef
A container comprising anSInstance
and of one of its minimalDeficiency
s.
-
Constructor Summary
Constructors Constructor Description FlatCInstance(Map<List<String>,SInstance> effects)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlatCInstance
add(SInstance serv, Deficiency def)
Returns theFlatCInstance
arising from this one by assuming thatdef
occurs withinserv
.SInstance
getEffect(InstanceLocator loc)
SInstance
getEffect(List<String> path)
(package private) Map<List<String>,SInstance>
getEffects()
BigDecimal
getProb(List<String> sPath)
Returns the probability that the effect specified bysPath
is not the empty set.private FlatCInstance.InstDef
instDefic(SInstance serv)
Maps the given effect which is given by a formula, onto anFlatCInstance.InstDef
consisting of a variable with probability distribution occuring in the formula and its minimal deficiency.FlatCInstance
remove(SInstance serv, Deficiency def)
Returns theFlatCInstance
arising from this one by assuming thatdef
does not occur withinserv
.(package private) FlatCInstance
substitute(SInstance serv, Formula form)
Returns theFlatCInstance
arising from this one by substitutingserv
byform
in all effects.String
toString()
-
-
-
Method Detail
-
getEffect
public SInstance getEffect(InstanceLocator loc)
-
remove
public FlatCInstance remove(SInstance serv, Deficiency def)
Returns theFlatCInstance
arising from this one by assuming thatdef
does not occur withinserv
.- Parameters:
serv
- aSInstance
with probability distribution.serv.distr != null
.def
- aDeficiency
minimal within the type ofserv
. **** is this unique or not? ****- Returns:
- a
FlatCInstance
arising from this one by assuming thatdef
does not occur withinserv
.
-
add
public FlatCInstance add(SInstance serv, Deficiency def)
Returns theFlatCInstance
arising from this one by assuming thatdef
occurs withinserv
.- Parameters:
serv
- aSInstance
with probability distribution.serv.distr != null
.def
- aDeficiency
minimal within the type ofserv
. **** is this unique or not? ****- Returns:
- a
FlatCInstance
arising from this one by assuming thatdef
occurs withinserv
.
-
substitute
FlatCInstance substitute(SInstance serv, Formula form)
Returns theFlatCInstance
arising from this one by substitutingserv
byform
in all effects.- Parameters:
serv
- aSInstance
.form
- aFormula
of appropriate type. ****- Returns:
- a
FlatCInstance
arising from this one by substitutingserv
byform
in all effects usingSInstance.substitute(eu.simuline.relana.model.SInstance, eu.simuline.relana.expressions.Formula)
.
-
instDefic
private FlatCInstance.InstDef instDefic(SInstance serv)
Maps the given effect which is given by a formula, onto anFlatCInstance.InstDef
consisting of a variable with probability distribution occuring in the formula and its minimal deficiency. If no such variable exists, the variables within the formula (which are then all associated with formulae) are substituted within the root formula, by their associated formulae.- Parameters:
serv
- anSInstance
given by a formula. **** what if no formula is present? ****- Returns:
- an
InstDef
consisting of a variable occuring in the formula and its minimal deficiency. If this does not exist,null
is returned.
-
getProb
public BigDecimal getProb(List<String> sPath)
Returns the probability that the effect specified bysPath
is not the empty set. It is intended to be applied primarily to Boolean effects, i.e. to effects isomorphic to Boolean ones, i.e. to one-point effects. Then this method returns the probability fortrue
.- Parameters:
sPath
- identifies a effect.- Returns:
- the probability described above as a
BigDecimal
value.
-
-