rwth.i2.ltlrv.util
Class SetUtils

java.lang.Object
  extended by rwth.i2.ltlrv.util.SetUtils

public class SetUtils
extends Object

SetUtils - Some static convenience methods for set operations.

Author:
Eric Bodden

Constructor Summary
SetUtils()
           
 
Method Summary
static
<T> void
clausesetProduct(Set<Set<T>> set1, Set<Set<T>> set2, Set<Set<T>> result)
          Implements the (cartesian) product of two clause sets.
static Set<IAFAState> clauseTT()
          Constructs an empty clause which represents TT (true).
static Set<Set<IAFAState>> emptyClauseSet()
          Constructs an empty clause set.
static Set<Set<IAFAState>> FF()
          Constructs an empty clause set, representing FF.
static Set<Set<IAFAState>> singletonClauseSet(IAFAState... elements)
          Constructs a set holding one single clause holding the given terms.
static Set<IAFAState> termClause(IAFAState... elements)
          Constructs a term clause/set for the given elements.
static Set<Set<IAFAState>> TT()
          Constructs an empty clause set, which represents TT (true).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetUtils

public SetUtils()
Method Detail

TT

public static Set<Set<IAFAState>> TT()
Constructs an empty clause set, which represents TT (true).

Returns:
{{}}

clauseTT

public static Set<IAFAState> clauseTT()
Constructs an empty clause which represents TT (true).

Returns:
{}

termClause

public static Set<IAFAState> termClause(IAFAState... elements)
Constructs a term clause/set for the given elements.

Parameters:
elements - some terms
Returns:
a clause holding those terms

singletonClauseSet

public static Set<Set<IAFAState>> singletonClauseSet(IAFAState... elements)
Constructs a set holding one single clause holding the given terms.

Parameters:
elements - some terms
Returns:
a set holding one clause holding the given terms

emptyClauseSet

public static Set<Set<IAFAState>> emptyClauseSet()
Constructs an empty clause set.

Returns:
an empty set

FF

public static Set<Set<IAFAState>> FF()
Constructs an empty clause set, representing FF.

Returns:
an empty set

clausesetProduct

public static <T> void clausesetProduct(Set<Set<T>> set1,
                                        Set<Set<T>> set2,
                                        Set<Set<T>> result)
Implements the (cartesian) product of two clause sets. If set1={{a,b}} and set2={{c},{d}} the result is {{a,c},{a,d},{b,c},{b,d}}. In logic terms this is the law of de Morgan.

Type Parameters:
T - type parameter (optional, used to circumvent type inference)
Parameters:
set1 - first factor
set2 - second factor
result - product of the two sets