T - The actual interpretation class used for this distribution.public class ProbabilityDistribution<T extends net.sf.tweety.commons.Interpretation> extends net.sf.tweety.commons.AbstractInterpretation implements Map<T,net.sf.tweety.math.probability.Probability>
| Constructor and Description |
|---|
ProbabilityDistribution(net.sf.tweety.commons.Signature signature)
Creates a new probability distribution.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
net.sf.tweety.math.probability.Probability |
conditionalProbability(net.sf.tweety.logics.cl.syntax.Conditional c)
Returns the probability of the given conditional
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
static <S extends net.sf.tweety.commons.Interpretation> |
convexCombination(double[] factors,
ProbabilityDistribution<S>[] creators)
Computes the convex combination of the
given probability distributions P1,...,PN with parameters factors, i.e.
|
ProbabilityDistribution<T> |
convexCombination(double d,
ProbabilityDistribution<T> other)
Computes the convex combination of this P1 and the
given probability distribution P2 with parameter d, i.e.
|
double |
entropy()
Returns the entropy of this probability distribution.
|
Set<Map.Entry<T,net.sf.tweety.math.probability.Probability>> |
entrySet() |
net.sf.tweety.math.probability.Probability |
get(Object key) |
net.sf.tweety.commons.Signature |
getSignature()
Returns the signature of the underlying language.
|
static <S extends net.sf.tweety.commons.Interpretation> |
getUniformDistribution(Set<S> interpretations,
net.sf.tweety.commons.Signature sig)
Returns the uniform distribution on the given interpretations.
|
boolean |
isEmpty() |
Set<T> |
keySet() |
ProbabilityDistribution<T> |
linearCombination(double d1,
double d2,
ProbabilityDistribution<T> other)
Makes a linear combination of this distribution "p1" and the given distribution "other" and
the given parameters, i.e.
|
protected static void |
normalize(List<Double> probabilities)
Normalizes the given list of probabilities, i.e.
|
net.sf.tweety.math.probability.Probability |
probability(net.sf.tweety.commons.Formula f)
Returns the probability of the given formula
|
net.sf.tweety.math.probability.Probability |
probability(net.sf.tweety.commons.Interpretation w)
Gets the probability of the given Herbrand interpretation (this is just an
alias for get(Object o).
|
net.sf.tweety.math.probability.Probability |
put(T key,
net.sf.tweety.math.probability.Probability value) |
void |
putAll(Map<? extends T,? extends net.sf.tweety.math.probability.Probability> m) |
net.sf.tweety.math.probability.Probability |
remove(Object key) |
boolean |
satisfies(net.sf.tweety.commons.BeliefBase beliefBase) |
boolean |
satisfies(net.sf.tweety.commons.Formula formula) |
int |
size() |
String |
toString() |
Collection<net.sf.tweety.math.probability.Probability> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic ProbabilityDistribution(net.sf.tweety.commons.Signature signature)
public net.sf.tweety.commons.Signature getSignature()
public boolean satisfies(net.sf.tweety.commons.Formula formula)
throws IllegalArgumentException
satisfies in interface net.sf.tweety.commons.InterpretationIllegalArgumentExceptionpublic boolean satisfies(net.sf.tweety.commons.BeliefBase beliefBase)
throws IllegalArgumentException
satisfies in interface net.sf.tweety.commons.InterpretationIllegalArgumentExceptionpublic net.sf.tweety.math.probability.Probability probability(net.sf.tweety.commons.Interpretation w)
throws IllegalArgumentException
w - a Herbrand interpretation.IllegalArgumentExceptionpublic net.sf.tweety.math.probability.Probability probability(net.sf.tweety.commons.Formula f)
f - a formulapublic net.sf.tweety.math.probability.Probability conditionalProbability(net.sf.tweety.logics.cl.syntax.Conditional c)
c - a conditionalprotected static void normalize(List<Double> probabilities)
public double entropy()
public ProbabilityDistribution<T> convexCombination(double d, ProbabilityDistribution<T> other)
d - a doubleother - a probability distributionIllegalArgumentException - if either d is not in [0,1] or this and
the given probability distribution are not defined on the same set of interpretations.public ProbabilityDistribution<T> linearCombination(double d1, double d2, ProbabilityDistribution<T> other)
d1 - a double.d2 - a double.other - a probability distribution.public static <S extends net.sf.tweety.commons.Interpretation> ProbabilityDistribution<S> convexCombination(double[] factors, ProbabilityDistribution<S>[] creators) throws IllegalArgumentException
S - The interpretation classfactors - a vector of doubles.creators - a vector of probability distributions.IllegalArgumentException - if either the sum of factors d is not in 1, or this and
the given probability distributions are not defined on the same set of interpretations, or
the lengths of creators and factors differ.public static <S extends net.sf.tweety.commons.Interpretation> ProbabilityDistribution<S> getUniformDistribution(Set<S> interpretations, net.sf.tweety.commons.Signature sig)
S - The interpretation classinterpretations - some interpretations.sig - a signaturepublic void clear()
public boolean containsKey(Object key)
containsKey in interface Map<T extends net.sf.tweety.commons.Interpretation,net.sf.tweety.math.probability.Probability>public boolean containsValue(Object value)
containsValue in interface Map<T extends net.sf.tweety.commons.Interpretation,net.sf.tweety.math.probability.Probability>public net.sf.tweety.math.probability.Probability get(Object key)
public boolean isEmpty()
public net.sf.tweety.math.probability.Probability put(T key, net.sf.tweety.math.probability.Probability value)
public net.sf.tweety.math.probability.Probability remove(Object key)
public int size()
public Collection<net.sf.tweety.math.probability.Probability> values()
Copyright © 2018. All rights reserved.