public class DRedTcRelation<V> extends java.lang.Object implements java.io.Serializable, ITcRelation<V>
Constructor and Description |
---|
DRedTcRelation() |
Modifier and Type | Method and Description |
---|---|
boolean |
addTuple(V source,
V target)
Returns true if the tc relation did not contain previously such a tuple that is defined by (source,target), false
otherwise.
|
void |
clear() |
boolean |
containsTuple(V source,
V target)
Returns true if a (source, target) node is present in the transitive closure relation, false otherwise.
|
void |
difference(DRedTcRelation<V> rA)
Computes the difference of this tc relation and the given rA parameter.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<V> |
getTupleEnds(V source)
Returns the set of nodes that are reachable from the given node.
|
java.util.Map<V,java.util.Set<V>> |
getTuplesForward() |
java.util.Set<V> |
getTupleStarts()
Returns the starting nodes from a transitive closure relation.
|
java.util.Set<V> |
getTupleStarts(V target)
Returns the set of nodes from which the target node is reachable.
|
int |
hashCode() |
boolean |
isEmpty() |
void |
removeTuple(V source,
V target) |
java.lang.String |
toString() |
void |
union(DRedTcRelation<V> rA)
Union operation of two tc realtions.
|
public void clear()
public boolean isEmpty()
public boolean addTuple(V source, V target)
source
- the source of the tupletarget
- the target of the tuplepublic void union(DRedTcRelation<V> rA)
rA
- the other tc relationpublic void difference(DRedTcRelation<V> rA)
rA
- the subtrahend relationpublic java.util.Set<V> getTupleEnds(V source)
ITcRelation
getTupleEnds
in interface ITcRelation<V>
source
- the starting nodepublic java.util.Set<V> getTupleStarts(V target)
target
- the target nodepublic java.util.Set<V> getTupleStarts()
ITcRelation
getTupleStarts
in interface ITcRelation<V>
public java.lang.String toString()
toString
in class java.lang.Object
public boolean containsTuple(V source, V target)
source
- the source nodetarget
- the target nodepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object