Apply this relation (same as image
).
Apply this relation (same as image
).
Build a new relation by collecting pairs produced by the partial
function f
wherever it is defined on pairs of this relation.
Build a new relation by collecting pairs produced by the partial
function f
wherever it is defined on pairs of this relation.
A companion object that provides factory methods for this kind of relation.
A companion object that provides factory methods for this kind of relation.
Compose this relation with st
.
Compose this relation with st
.
Does the domain of this relation contain the value t
?
Does the domain of this relation contain the value t
?
Does the range of this relation contain the value u
?
Does the range of this relation contain the value u
?
The domain of this relation.
The domain of this relation.
The graph of this relation.
The graph of this 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.
A relation that maps each element of the range to its position (starting counting at zero).
A relation that maps each element of the range to its position (starting counting at zero).
Invert this relation.
Invert this relation. 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 matches pairs.
An auxiliary extractor for this relation that matches pairs. The
match succeeds if and only if the matched value t
has a unique
image in the relation. Both t
and its unique image value are
returned for a successful match.
The preImage of a value of the relation's range is a set of the values in the domain that are related to that range value.
The preImage of a value of the relation's range is a set of the values in the domain that are related to that range value.
A relation that maps each element of the domain to its position starting at zero.
A relation that maps each element of the domain to its position starting at zero.
Domain projection, i.e., form a relation that relates each value in the domain to all of the related values in the range.
Domain projection, i.e., form a relation that relates each value in the domain to all of the related values in the range.
Range projection, i.e., form a relation that relates each value in the range to all of the related values in the domain.
Range projection, i.e., form a relation that relates each value in the range to all of the related values in the domain.
The range of this relation.
The range of this relation.
A relation can be used as an extractor that matches if and only if
the matched value t
has a unique image in the relation.
A relation can be used as an extractor that matches if and only if
the matched value t
has a unique image in the relation. The unique
image value is returned for a successful match.
A relation can be used as an extractor that returns the image for a
given domain value t
.
A relation can be used as an extractor that returns the image for a
given domain value t
. Fails if t
is not in the domain.
Union this relation with r
.
Union this relation with r
.
Return the sub-relation of this relation that contains just those
pairs that have t
as their domain element.
Return the sub-relation of this relation that contains just those
pairs that have t
as their domain element.
Return the sub-relation of this relation that contains just those
pairs that have u
as their range element.
Return the sub-relation of this relation that contains just those
pairs that have u
as their range element.
A binary relation between values of type
T
and values of typeU
. Constructed from a vector of pairs that constitute the relation's graph.