|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpaul.Constraints.Var<java.util.Set<T>>
jpaul.Constraints.SetConstraints.SVar<T>
public class SVar<T>
SVar is a variable whose values are sets of Ts.
| Field Summary |
|---|
| Fields inherited from class jpaul.Constraints.Var |
|---|
id |
| Constructor Summary | |
|---|---|
SVar()
Creates an SVar using a HashSet
factory (SetFacts.hash) |
|
SVar(SetFactory<T> setFact)
Creates an SVar. |
|
| Method Summary | |
|---|---|
java.util.Set<T> |
copy(java.util.Set<T> s)
Returns a set that contains the same elements as s. |
boolean |
join(java.util.Set<T> s1,
java.util.Set<T> s2)
Adds all the elements from s2 to
s1. |
java.lang.String |
toString()
String representation of this variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SVar(SetFactory<T> setFact)
SVar.
setFact - Set factory used internally by the copy method. For a set constraint systems with a few large
sets, a HashSet factory (SetFacts.hash) is a safe
choice; in other cases, you may gain significant speed by
using more appropriate set factories.public SVar()
SVar using a HashSet
factory (SetFacts.hash)
SVar(SetFactory)| Method Detail |
|---|
public java.lang.String toString()
Varthis variable. The
default implementation returns "Vid" where
id is a unique integer id.
toString in class Var<java.util.Set<T>>public java.util.Set<T> copy(java.util.Set<T> s)
s. Constructs the new set using the set factory
passed to the constructor.
copy in class Var<java.util.Set<T>>
public boolean join(java.util.Set<T> s1,
java.util.Set<T> s2)
s2 to
s1.
join in class Var<java.util.Set<T>>true iff the x changed after
y was joined to it.
A false result means that x was
already bigger than y. Hence, this operation
implictly defines the order relation in the lattice where this
variable takes values.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||