org.bitbucket.inkytonik.kiama.relation
The image of a value of the relation's domain is a set of the values in the range that are related to that domain value.
The image of a value of the relation's domain is a set of the values in the range that are related to that domain value.
Does the domain of this relation contain the value t
?
Does the domain of this relation contain the value t
?
The domain of this relation.
The domain of this relation.
An accessor for the graph field for those rare cases where a client needs to get to it.
An accessor for the graph field for those rare cases where a client needs to get to it.
Return a relation that is the inverse of this one.
Return a relation that is the inverse of this one. In other
words, if (t,u)
is in the relation, then (u,t)
is in the
inverted relation.
Is this relation empty (i.e., contains no pairs)?
Is this relation empty (i.e., contains no pairs)?
An auxiliary extractor for this relation that returns the matched
value t
and its image as a sequence.
An auxiliary extractor for this relation that returns the matched
value t
and its image as a sequence.
Return pairs that describe the mappings in this relation.
Return pairs that describe the mappings in this relation. I.e., the
pair (t,u)
will be included if t
is related to u
.
Add the pair (t,u)
to the relation and the pair (u,t)
to
its inverse.
Add the pair (t,u)
to the relation and the pair (u,t)
to
its inverse.
For each u
taken from us
add the pair (t,u)
to the relation
and the pair (u,t)
to its inverse.
For each u
taken from us
add the pair (t,u)
to the relation
and the pair (u,t)
to its inverse.
The range of this relation.
The range of this relation.
Set the image of the relation for t
to us
.
Set the image of the relation for t
to us
. Takes care to make
sure that all mentioned nodes are present in the graph and the
inverse graph.
The size of this relation.
The size of this relation.
A relation can be used as an extractor that matches the image of the
matched value t
.
A relation can be used as an extractor that matches the image of the
matched value t
. E.g., the pattern relation(a,b)
succeeds if and
only if the image of the matched value contains exactly two elements,
which are then bound to a
and b
, respectively. Normal sequence
matching works, such as case relation(a, _*)
to match if there is
at least one element in the image and bind the first element to a
.
A tree relation is a binary relation on tree nodes with an extra property that the
image
operation throws aNodeNotInTreeException
exception if it is applied to a node that is not in this tree.T
is the type of the tree nodes.