Class AnswerSet

    • Field Detail

      • level

        public final int level
      • weight

        public final int weight
    • Constructor Detail

      • AnswerSet

        public AnswerSet()
        Creates a new empty AnswerSet.
      • AnswerSet

        public AnswerSet​(java.util.Collection<ASPLiteral> lits,
                         int level,
                         int weight)
        Creates a new empty AnswerSet with the given level and weight.
        Parameters:
        lits - the literals
        level - the level
        weight - the weight
      • AnswerSet

        public AnswerSet​(AnswerSet other)
        Copy-Constructor
        Parameters:
        other - another answer set
    • Method Detail

      • getLiteralsWithName

        public java.util.Set<ASPLiteral> getLiteralsWithName​(java.lang.String name)
        Returns all literals of a given name in the AnswerSet.
        Parameters:
        name - the name of the literal
        Returns:
        set of literals
      • clone

        public java.lang.Object clone()
      • satisfies

        public boolean satisfies​(Program beliefBase)
                          throws java.lang.IllegalArgumentException
        Description copied from interface: Interpretation
        Checks whether this interpretation satisfies the given knowledge base.
        Parameters:
        beliefBase - a knowledge base.
        Returns:
        "true" if this interpretation satisfies the given knowledge base.
        Throws:
        java.lang.IllegalArgumentException - IllegalArgumentException if the knowledgebase does not correspond to the expected language.
      • satisfies

        public boolean satisfies​(ASPRule formula)
                          throws java.lang.IllegalArgumentException
        Description copied from interface: Interpretation
        Checks whether this interpretation satisfies the given formula.
        Parameters:
        formula - a formula .
        Returns:
        "true" if this interpretation satisfies the given formula.
        Throws:
        java.lang.IllegalArgumentException - if the formula does not correspond to the expected language.