|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.engine.satlab.Clause
public abstract class Clause
A propositional clause.
0 !in literals |
no lit: literals | -lit in literals |
some antecedents => #antecedents > 1 |
some antecedents =>
literals = { lit: antecedents[int].literals |
no i: [0..#antecedents-1) | lit in antecedents[i].literals && -lit in antecedents[i+1].literals } |
literals: set int |
antecedents: Clause[] |
Method Summary | |
---|---|
abstract java.util.Iterator<Clause> |
antecedents()
Returns an iterator that traverses this.antecedents in proper sequence. |
boolean |
equals(java.lang.Object o)
Returns true if o is a Clause whose literals and antecedents are equal to those of this clause. |
int |
hashCode()
Returns the hashcode for this clause. |
abstract IntIterator |
literals()
Returns an iterator over the literals in this clause, in the ascending order of absolute values. |
abstract int |
maxVariable()
Returns the largest variable identifier occuring in this.literals. |
abstract int |
numberOfAntecedents()
Returns the number of antecedents of this clause. |
abstract int |
size()
Returns the size of this clause, measured in the number of literals. |
int[] |
toArray()
Returns a new array of length this.size(), initialized with this.literals. |
abstract int[] |
toArray(int[] array)
Copies this.literals into the specified array, provided that it is large enough, and returns it. |
java.lang.String |
toString()
Returns a string representation of this clause. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public abstract int size()
public abstract IntIterator literals()
public abstract int maxVariable()
public abstract int[] toArray(int[] array)
java.lang.NullPointerException
- - array = nullpublic int[] toArray()
public abstract int numberOfAntecedents()
public abstract java.util.Iterator<Clause> antecedents()
Note:The clause objects returned by the iterator are not required to be immutable. In particular, the state of a clause object returned by next() (as well as the state of any object obtained through that clause's antecedents() methods) is guaranteed to remain the same only until the subsequent call to next().
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |