Class PossibilityDistribution

java.lang.Object
org.tweetyproject.logics.translators.adfpossibilistic.PossibilityDistribution

public class PossibilityDistribution extends Object
Models a possibility distribution (PD) as defined in Christoph Beierle / Gabriele Kern-Isberner: Methoden Wissensbasierter Systeme
Author:
Jonas Schumacher
  • Field Details

  • Constructor Details

    • PossibilityDistribution

      public PossibilityDistribution(PlSignature signature)
      Creates a new possibility distribution (PD) mapping each given interpretation to 1.0 (least specific value = maximal entropy).
      Parameters:
      signature - the signature of the language this PD is defined on.
  • Method Details

    • getPossibility

      public Double getPossibility(PossibleWorld w) throws IllegalArgumentException
      Gets the possibility of the given possible world.
      Parameters:
      w - an possible world.
      Returns:
      the possibility of the given possible world.
      Throws:
      IllegalArgumentException - if the given possible world has no possibility in this PD.
    • setPossibility

      public void setPossibility(PossibleWorld w, Double value)
      Sets the possibility for the given possible world.
      Parameters:
      w - an possible world.
      value - the possibility for the possible world.
    • getPossibility

      public Double getPossibility(PlFormula formula) throws IllegalArgumentException
      Gets the possibility measure of the given formula. Throws an IllegalArgumentException when the language of the formula does not correspond to the language of the interpretations this PD is defined on. Otherwise the possibility of a formula is defined as the maximal possibility of its satisfying interpretations.
      Parameters:
      formula - a formula.
      Returns:
      the possibility of the given formula.
      Throws:
      IllegalArgumentException - if the languages of the formula does not correspond to the language of the interpretations this PD is defined on.
    • getNecessity

      public Double getNecessity(PlFormula formula) throws IllegalArgumentException
      Gets the necessity measure of the given formula.
      Parameters:
      formula - a formula.
      Returns:
      the necessity of the given formula.
      Throws:
      IllegalArgumentException - if the languages of the formula does not correspond to the language of the interpretations this PD is defined on.
    • isNormalized

      public boolean isNormalized()
      Check whether this PD is normalized, i.e. whether its max. possibility value equals one.
      Returns:
      "true" if this PD is normalized
    • getPossibleWorlds

      public Set<PossibleWorld> getPossibleWorlds()
      Returns all interpretations that are mapped to a possibility unequal to zero.
      Returns:
      all interpretations that are mapped to a possibility unequal to zero.
    • getPlausibleWorlds

      public Set<PossibleWorld> getPlausibleWorlds()
      Returns all interpretations that are mapped to 1
      Returns:
      all interpretations that are mapped to 1
    • getSignature

      public PlSignature getSignature()
      Returns the signature of the first-order language this PD is defined on.
      Returns:
      the signature of the first-order language this PD is defined on.
    • atLeastAsSpecificAs

      public boolean atLeastAsSpecificAs(PossibilityDistribution other)
      Check whether this PD is at least as specific as another PD "other"
      Parameters:
      other - : another PD to be compared with
      Returns:
      true, if this PD is at least as specific as the other PD
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object