Changes between Version 129 and Version 130 of IR2


Ignore:
Timestamp:
06/11/21 15:57:11 (5 years ago)
Author:
Alex Wilton
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v129 v130  
    489489
    490490{{{
     491$template<$typename X, $typename Y> using $rel = $set<$pair<X,Y>>;
    491492<X,Y> $set<X> $rel_domain( $rel<X,Y> r ); // Returns the set of x in X such that (x,y) in r for at least one y in Y.
    492493<X,Y> $set<Y> $rel_range( $rel<X,Y> r ); // Returns the set of y in Y such that (x,y) in r for at least one x in X.
    493 <X,Y> $set<Y> $rel_getRelated( $rel<X,Y> r, X x); // Returns a $set<Y> B such that y in B iff (x,y) in r.
    494 <X,Y> $set<X> $rel_getRelated( $rel<X,Y> r, Y y); // Returns a $set<X> A such that x in A iff (x,y) in r.
    495 <X,Y> $rel<Y,X> $rel_converse( $rel<X,Y> r ); // Returns the relation r' such that (y,x) in r' iff (x,y) in r.
     494<X,Y> $set<Y> $rel_joinLeft( $rel<X,Y> r, X x); // Returns a $set<Y> B such that y in B iff (x,y) in r.
     495<X,Y> $set<X> $rel_joinRight( $rel<X,Y> r, Y y); // Returns a $set<X> A such that x in A iff (x,y) in r.
     496<X,Y> $rel<Y,X> $rel_inverse( $rel<X,Y> r ); // Returns the relation r' such that (y,x) in r' iff (x,y) in r.
    496497<X> $rel<X,X> $rel_identity( $set<X> s ); // Returns the relation r such that (x,x) in r for every x in s.
    497498<X,Y,Z> $rel<X,Z> $rel_join( $rel<X,Y> r1, $rel<Y,Z> r2 ); // Returns the relation r3 such that (x,z) in r3 iff (x,y) in r1 and (y,z) in r2 for some element y of Y.