de.rwth.domains
Class Domain

java.lang.Object
  |
  +--de.rwth.domains.Domain

public class Domain
extends java.lang.Object

This class contains methods for debugging and visualisation of implementations for the interfaces in this package.

Version:
$Id: Domain.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen

Constructor Summary
Domain()
           
 
Method Summary
static void checkProperties(CompleteLattice cl)
          Checks the properties of a complete lattice.
static void checkProperties(CompleteLattice cl, java.lang.Object[] es)
          Checks the properties of a complete lattice.
static void checkProperties(CompletePOSet cposet)
          Checks the properties of a complete partially ordered set.
static void checkProperties(CompletePOSet cposet, java.lang.Object[] es)
          Checks the properties of a complete partially ordered set.
static void checkProperties(Lattice l)
          Checks the properties of a lattice.
static void checkProperties(Lattice l, java.lang.Object[] es)
          Checks the properties of a lattice.
static void checkProperties(LowerSemiLattice lsl)
          Checks the properties of a lower semi lattice.
static void checkProperties(LowerSemiLattice lsl, java.lang.Object[] es)
          Checks the properties of a lower semi lattice.
static void checkProperties(POSet poset)
          Checks the properties of a partially ordered set.
static void checkProperties(POSet poset, java.lang.Object[] es)
          Checks the properties of a partially ordered set.
static void checkProperties(PreLattice l)
          Checks the properties of a pre lattice.
static void checkProperties(PreLattice l, java.lang.Object[] es)
          Checks the properties of a pre lattice.
static void checkProperties(PreLowerSemiLattice plsl)
          Checks the properties of a pre lower semi lattice.
static void checkProperties(PreLowerSemiLattice plsl, java.lang.Object[] es)
          Checks the properties of a pre lower semi lattice.
static void checkProperties(PreUpperSemiLattice pusl)
          Checks the properties of a pre upper semi lattice.
static void checkProperties(PreUpperSemiLattice pusl, java.lang.Object[] es)
          Checks the properties of a pre upper semi lattice.
static void checkProperties(Set set)
          Checks the properties of a set.
static void checkProperties(Set set, java.lang.Object[] es)
          Checks the properties of a set.
static void checkProperties(UpperSemiLattice usl)
          Checks the properties of an upper semi lattice.
static void checkProperties(UpperSemiLattice usl, java.lang.Object[] es)
          Checks the properties of an upper semi lattice.
static java.lang.Object[] getElements(Set set)
          Gets the elements of a finite set, or the elements of the skeleton subset of an infinite set with finite skeleton subset.
static Graph hasseDiagram(POSet poset)
          Computes the Hasse diagram of a partially ordered set.
protected static boolean isCovered(POSet poset, java.lang.Object[] es, int i, int j)
          Computes the covered relation induced by a partial order.
static boolean isMonotonic(Function f)
          Checks if a function is monotonic.
static java.lang.String setToString(Set set)
          Creates a string representation of a set by enclosing all elements in braces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Domain

public Domain()
Method Detail

getElements

public static java.lang.Object[] getElements(Set set)
                                      throws java.lang.Exception
Gets the elements of a finite set, or the elements of the skeleton subset of an infinite set with finite skeleton subset.
Parameters:
set - a Set value
Returns:
an Object[] value
Throws:
java.lang.Exception - neither the set nor it skeleton subset is finite

checkProperties

public static void checkProperties(Set set,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a set.
Parameters:
set - a Set value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(Set set)
                            throws java.lang.Exception
Checks the properties of a set.
Parameters:
set - a Set value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(POSet poset,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a partially ordered set.
Parameters:
poset - a POSet value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(POSet poset)
                            throws java.lang.Exception
Checks the properties of a partially ordered set.
Parameters:
poset - a POSet value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(CompletePOSet cposet,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a complete partially ordered set.
Parameters:
cposet - a CompletePOSet value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(CompletePOSet cposet)
                            throws java.lang.Exception
Checks the properties of a complete partially ordered set.
Parameters:
cposet - a CompletePOSet value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(PreUpperSemiLattice pusl,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a pre upper semi lattice.
Parameters:
pusl - a PreUpperSemiLattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(PreUpperSemiLattice pusl)
                            throws java.lang.Exception
Checks the properties of a pre upper semi lattice.
Parameters:
pusl - a PreUpperSemiLattice value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(PreLowerSemiLattice plsl,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a pre lower semi lattice.
Parameters:
pusl - a PreUpperSemiLattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(PreLowerSemiLattice plsl)
                            throws java.lang.Exception
Checks the properties of a pre lower semi lattice.
Parameters:
pusl - a PreUpperSemiLattice value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(UpperSemiLattice usl,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of an upper semi lattice.
Parameters:
usl - an UpperSemiLattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(UpperSemiLattice usl)
                            throws java.lang.Exception
Checks the properties of an upper semi lattice.
Parameters:
usl - an UpperSemiLattice value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(LowerSemiLattice lsl,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a lower semi lattice.
Parameters:
lsl - a LowerSemiLattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(LowerSemiLattice lsl)
                            throws java.lang.Exception
Checks the properties of a lower semi lattice.
Parameters:
lsl - a LowerSemiLattice value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(PreLattice l,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a pre lattice.
Parameters:
l - a PreLattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(PreLattice l)
                            throws java.lang.Exception
Checks the properties of a pre lattice.
Parameters:
l - a PreLattice value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(Lattice l,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a lattice.
Parameters:
l - a Lattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(Lattice l)
                            throws java.lang.Exception
Checks the properties of a lattice.
Parameters:
l - a Lattice value
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(CompleteLattice cl,
                                   java.lang.Object[] es)
                            throws java.lang.Exception
Checks the properties of a complete lattice.
Parameters:
cl - a CompleteLattice value
es - an Object[] the elements of the set.
Throws:
java.lang.Exception - if an error occurs

checkProperties

public static void checkProperties(CompleteLattice cl)
                            throws java.lang.Exception
Checks the properties of a complete lattice.
Parameters:
cl - a CompleteLattice value
Throws:
java.lang.Exception - if an error occurs

setToString

public static java.lang.String setToString(Set set)
Creates a string representation of a set by enclosing all elements in braces. This will loop forever for infinite sets.
Parameters:
set - a Set value
Returns:
a String value

isMonotonic

public static boolean isMonotonic(Function f)
                           throws FunctionException
Checks if a function is monotonic. This will loop forever if the domain of the function in infinite.
Parameters:
f - a Function value
Returns:
a boolean value
Throws:
FunctionException - if either domain or range are not partially ordered.

isCovered

protected static boolean isCovered(POSet poset,
                                   java.lang.Object[] es,
                                   int i,
                                   int j)
Computes the covered relation induced by a partial order.
Parameters:
poset - a POSet value: The underlying order.
es - an Object[] value: The array of elements.
i - an int value: The index of the first element.
j - an int value: The index of the second element.
Returns:
a boolean value: true iff es[i] is covered by es[j]

hasseDiagram

public static Graph hasseDiagram(POSet poset)
                          throws java.lang.Exception
Computes the Hasse diagram of a partially ordered set.
Parameters:
poset - a POSet value
Returns:
a Graph value
Throws:
java.lang.Exception - if an error occurs