Module logicng

Class And

  • All Implemented Interfaces:
    Iterable<Formula>

    public final class And
    extends NAryOperator
    Boolean conjunction.

    Invariants: - has at least two elements - does not contain duplicates - does not contain complementary literals - does not contain constants

    Since:
    1.0
    Version:
    2.2.0
    • Method Detail

      • evaluate

        public boolean evaluate​(Assignment assignment)
        Description copied from class: Formula
        Evaluates this formula with a given assignment. A literal not covered by the assignment evaluates to false if it is positive, otherwise it evaluates to true.
        Specified by:
        evaluate in class Formula
        Parameters:
        assignment - the given assignment
        Returns:
        the result of the evaluation, true or false
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object