sbt

# Relation

#### 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.

Linear Supertypes
AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. Relation
2. AnyRef
3. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

### Abstract Value Members

1. #### abstract def +(a: A, bs: Traversable[B]): Relation[A, B]

Includes in the relation `(a, b)` for all `b` in `bs`.

2. #### abstract def +(a: A, b: B): Relation[A, B]

Includes `(a, b)` in the relation.

3. #### abstract def +(pair: (A, B)): Relation[A, B]

Includes `pair` in the relation.

4. #### abstract def ++(rs: Traversable[(A, B)]): Relation[A, B]

Includes the given pairs in this relation.

5. #### abstract def ++(r: Relation[A, B]): Relation[A, B]

Returns the union of the relation `r` with this relation.

6. #### abstract def -(pair: (A, B)): Relation[A, B]

Removes `pair` from this relation.

7. #### abstract def -(_1: A): Relation[A, B]

Removes all pairs `(_1, _2)` from this relation.

8. #### abstract def --(pairs: TraversableOnce[(A, B)]): Relation[A, B]

Removes all `pairs` from this relation.

9. #### abstract def --(_1s: Traversable[A]): Relation[A, B]

Removes all elements `(_1, _2)` for all `_1` in `_1s` from this relation.

10. #### abstract def _1s: Set[A]

Returns the set of all `_1`s such that `(_1, _2)` is in this relation.

11. #### abstract def _2s: Set[B]

Returns the set of all `_2`s such that `(_1, _2)` is in this relation.

12. #### abstract def all: Traversable[(A, B)]

Returns all pairs in this relation.

13. #### abstract def contains(a: A, b: B): Boolean

Returns true iff `(a,b)` is in this relation

14. #### abstract def filter(f: (A, B) ⇒ Boolean): Relation[A, B]

Returns a relation with only pairs `(a,b)` for which `f(a,b)` is true.

15. #### abstract def forward(_1: A): Set[B]

Returns the set of all `_2`s such that `(_1, _2)` is in this relation.

16. #### 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.

17. #### abstract def groupBy[K](f: ((A, B)) ⇒ K): Map[K, Relation[A, B]]

Partitions this relation into a map of relations according to some discriminator function `f`.

18. #### abstract def reverse(_2: B): Set[A]

Returns the set of all `_1`s such that `(_1, _2)` is in this relation.

19. #### 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.

20. #### abstract def size: Int

Returns the number of pairs in this relation

### Concrete Value Members

1. #### final def !=(arg0: AnyRef): Boolean

Definition Classes
AnyRef
2. #### final def !=(arg0: Any): Boolean

Definition Classes
Any
3. #### final def ##(): Int

Definition Classes
AnyRef → Any
4. #### final def ==(arg0: AnyRef): Boolean

Definition Classes
AnyRef
5. #### final def ==(arg0: Any): Boolean

Definition Classes
Any
6. #### final def asInstanceOf[T0]: T0

Definition Classes
Any
7. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
8. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
9. #### def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
10. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
11. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
12. #### def hashCode(): Int

Definition Classes
AnyRef → Any
13. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
14. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
15. #### final def notify(): Unit

Definition Classes
AnyRef
16. #### final def notifyAll(): Unit

Definition Classes
AnyRef
17. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
18. #### def toString(): String

Definition Classes
AnyRef → Any
19. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
20. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
21. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )