Class DRedTcRelation<V>
java.lang.Object
tools.refinery.interpreter.rete.itc.alg.dred.DRedTcRelation<V>
- All Implemented Interfaces:
ITcRelation<V>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the tc relation did not contain previously such a tuple that is defined by (source,target), false otherwise.voidclear()booleancontainsTuple(V source, V target) Returns true if a (source, target) node is present in the transitive closure relation, false otherwise.voiddifference(DRedTcRelation<V> rA) Computes the difference of this tc relation and the given rA parameter.booleangetTupleEnds(V source) Returns the set of nodes that are reachable from the given node.Returns the starting nodes from a transitive closure relation.getTupleStarts(V target) Returns the set of nodes from which the target node is reachable.inthashCode()booleanisEmpty()voidremoveTuple(V source, V target) toString()voidunion(DRedTcRelation<V> rA) Union operation of two tc realtions.
-
Constructor Details
-
DRedTcRelation
public DRedTcRelation()
-
-
Method Details
-
clear
public void clear() -
isEmpty
public boolean isEmpty() -
removeTuple
-
addTuple
Returns true if the tc relation did not contain previously such a tuple that is defined by (source,target), false otherwise.- Parameters:
source- the source of the tupletarget- the target of the tuple- Returns:
- true if the relation did not contain previously the tuple
-
union
Union operation of two tc realtions.- Parameters:
rA- the other tc relation
-
difference
Computes the difference of this tc relation and the given rA parameter.- Parameters:
rA- the subtrahend relation
-
getTupleEnds
Description copied from interface:ITcRelationReturns the set of nodes that are reachable from the given node.- Specified by:
getTupleEndsin interfaceITcRelation<V>- Parameters:
source- the starting node- Returns:
- the set of reachable nodes
-
getTupleStarts
Returns the set of nodes from which the target node is reachable.- Parameters:
target- the target node- Returns:
- the set of source nodes
-
getTupleStarts
Description copied from interface:ITcRelationReturns the starting nodes from a transitive closure relation.- Specified by:
getTupleStartsin interfaceITcRelation<V>- Returns:
- the set of starting nodes
-
toString
-
containsTuple
Returns true if a (source, target) node is present in the transitive closure relation, false otherwise.- Parameters:
source- the source nodetarget- the target node- Returns:
- true if tuple is present, false otherwise
-
equals
-
hashCode
public int hashCode() -
getTuplesForward
-