Class SAT.Clause<P>

java.lang.Object
java.util.AbstractCollection<SAT.Literal<? extends P>>
eu.bandm.tools.util.SAT.Clause<P>
All Implemented Interfaces:
Iterable<SAT.Literal<? extends P>>, Collection<SAT.Literal<? extends P>>
Enclosing class:
SAT<P>

protected abstract static class SAT.Clause<P> extends AbstractCollection<SAT.Literal<? extends P>>
Disjunction of literals.

Literals are accessible via the unmodifiable collection interface.

  • Constructor Details Link icon

    • Clause Link icon

      protected Clause()
  • Method Details Link icon

    • isTrue Link icon

      public abstract boolean isTrue()
      Check whether this clause is tautological.
      Returns:
      true if this clause is true under all interpretations; false otherwise.
    • isFalse Link icon

      public abstract boolean isFalse()
      Check whether this clause is unsatisfiable.
      Returns:
      true if this clause is false under all interpretations; false otherwise.
    • isUnit Link icon

      public abstract boolean isUnit()
      Check whether this clause is unitary.
      Returns:
      true if this clause contains exactly one literal; false otherwise.
    • getUnit Link icon

      public abstract SAT.Literal<? extends P> getUnit()
      Extract unit literal.
      Returns:
      if this clause contains exactly one literal, it is returned; null otherwise.
    • score Link icon

      public int score()
    • propagate Link icon

      abstract SAT.Clause<P> propagate(SAT.Literal<? extends P> lit)
    • or Link icon

      static <P> SAT.Clause<P> or(SAT.Literal<? extends P> first, SAT.Clause<P> rest)
    • or Link icon

      @SafeVarargs static <P> SAT.Clause<P> or(SAT.Literal<? extends P>... lits)