|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.util.Relation
public class Relation
This class provides methods for working with relation/function.
Constructor Summary | |
---|---|
Relation()
|
Method Summary | ||
---|---|---|
static
|
functionClosure(Map<K,K> fr,
boolean sortedDomain,
boolean sortedCoDomain)
Builds a transitive closure of a function. |
|
static
|
functionInverse(Map<K,K> fr,
boolean sortedDomain,
boolean sortedCoDomain)
Builds an inverse function or relation of a function. |
|
static
|
relationClosure(Map<K,Set<K>> fr,
boolean sortedDomain,
boolean sortedCoDomain)
Builds a transitive closure of a relation. |
|
static
|
relationInverse(Map<K,Set<K>> fr,
boolean sortedDomain,
boolean sortedCoDomain)
Builds an inverse function or relation of a relation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Relation()
Method Detail |
---|
public static <K> Map<K,Set<K>> relationClosure(Map<K,Set<K>> fr, boolean sortedDomain, boolean sortedCoDomain)
fr
- The relation. Must be non-null. Each key and value must be
non-null.sortedDomain
- Indicates that the resulting domain should be sorted. If true,
then fr's domain is Comparable.sortedCoDomain
- Indicates that the resulting co-domain should be a sorted set.
If true, then fr's co-domain is Set<Comparable>.
public static <K> Map<K,Set<K>> functionClosure(Map<K,K> fr, boolean sortedDomain, boolean sortedCoDomain)
fr
- The function. Must be non-null. Each key and value must be
non-null.sortedDomain
- Indicates that the resulting domain should be sorted. If true,
then fr's domain is Comparable.sortedCoDomain
- Indicates that the resulting co-domain should be a sorted set.
If true, then fr's co-domain is Comparable.
public static <K> Map<K,Set<K>> functionInverse(Map<K,K> fr, boolean sortedDomain, boolean sortedCoDomain)
fr
- The function. Must be non-null. Each key and value must be
non-null.sortedDomain
- Indicates that the resulting domain should be sorted. If true,
then fr's domain is Comparable.sortedCoDomain
- Indicates that the resulting co-domain should be a sorted set.
If true, then fr's co-domain is Comparable.
public static <K> Map<K,Set<K>> relationInverse(Map<K,Set<K>> fr, boolean sortedDomain, boolean sortedCoDomain)
fr
- The relation. Must be non-null. Each key and value must be
non-null.sortedDomain
- Indicates that the resulting domain should be sorted. If true,
then fr's domain is Comparable.sortedCoDomain
- Indicates that the resulting co-domain should be a sorted set.
If true, then fr's co-domain is Set<Comparable>.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |