trait Relation[A, B] extends AnyRef
Binary relation between A and B. It is a set of pairs (_1, _2) for _1 in A, _2 in B.
- Alphabetic
- By Inheritance
- Relation
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
+(a: A, bs: Traversable[B]): Relation[A, B]
Includes in the relation
(a, b)
for allb
inbs
. -
abstract
def
+(a: A, b: B): Relation[A, B]
Includes
(a, b)
in the relation. -
abstract
def
+(pair: (A, B)): Relation[A, B]
Includes
pair
in the relation. -
abstract
def
++(rs: Traversable[(A, B)]): Relation[A, B]
Includes the given pairs in this relation.
-
abstract
def
++(r: Relation[A, B]): Relation[A, B]
Returns the union of the relation
r
with this relation. -
abstract
def
-(pair: (A, B)): Relation[A, B]
Removes
pair
from this relation. -
abstract
def
-(_1: A): Relation[A, B]
Removes all pairs
(_1, _2)
from this relation. -
abstract
def
--(relations: Relation[A, B]): Relation[A, B]
Removes all
relations
from this relation. -
abstract
def
--(pairs: TraversableOnce[(A, B)]): Relation[A, B]
Removes all
pairs
from this relation. -
abstract
def
--(_1s: Traversable[A]): Relation[A, B]
Removes all elements
(_1, _2)
for all_1
in_1s
from this relation. -
abstract
def
_1s: Set[A]
Returns the set of all
_1
s such that(_1, _2)
is in this relation. -
abstract
def
_2s: Set[B]
Returns the set of all
_2
s such that(_1, _2)
is in this relation. -
abstract
def
all: Traversable[(A, B)]
Returns all pairs in this relation.
-
abstract
def
contains(a: A, b: B): Boolean
Returns true iff
(a,b)
is in this relation -
abstract
def
filter(f: (A, B) ⇒ Boolean): Relation[A, B]
Returns a relation with only pairs
(a,b)
for whichf(a,b)
is true. -
abstract
def
forward(_1: A): Set[B]
Returns the set of all
_2
s such that(_1, _2)
is in this relation. -
abstract
def
forwardMap: Map[A, Set[B]]
Represents this relation as a
Map
from a_1
to the set of_2
s such that(_1, _2)
is in this relation.Represents this relation as a
Map
from a_1
to the set of_2
s such that(_1, _2)
is in this relation.Specifically, there is one entry for each
_1
such that(_1, _2)
is in this relation for some_2
. The value associated with a given_1
is the set of all_2
s such that(_1, _2)
is in this relation. -
abstract
def
groupBy[K](discriminator: ((A, B)) ⇒ K): Map[K, Relation[A, B]]
Partitions this relation into a map of relations according to some discriminator function.
-
abstract
def
partition(f: (A, B) ⇒ Boolean): (Relation[A, B], Relation[A, B])
Returns a pair of relations: the first contains only pairs
(a,b)
for whichf(a,b)
is true and the other only pairs(a,b)
for whichf(a,b)
is false. -
abstract
def
reverse(_2: B): Set[A]
Returns the set of all
_1
s such that(_1, _2)
is in this relation. -
abstract
def
reverseMap: Map[B, Set[A]]
Represents this relation as a
Map
from a_2
to the set of_1
s such that(_1, _2)
is in this relation.Represents this relation as a
Map
from a_2
to the set of_1
s such that(_1, _2)
is in this relation.Specifically, there is one entry for each
_2
such that(_1, _2)
is in this relation for some_1
. The value associated with a given_2
is the set of all_1
s such that(_1, _2)
is in this relation. -
abstract
def
size: Int
Returns the number of pairs in this relation
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()