Relation

object Relation
Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def empty[A, B]: Relation[A, B]

Constructs a new immutable, finite relation that is initially empty.

Constructs a new immutable, finite relation that is initially empty.

def make[A, B](forward: Map[A, Set[B]], reverse: Map[B, Set[A]]): Relation[A, B]

Constructs a Relation from underlying forward and reverse representations, without checking that they are consistent. This is a low-level constructor and the alternatives empty and reconstruct should be preferred.

Constructs a Relation from underlying forward and reverse representations, without checking that they are consistent. This is a low-level constructor and the alternatives empty and reconstruct should be preferred.

def merge[A, B](rels: Iterable[Relation[A, B]]): Relation[A, B]
def reconstruct[A, B](forward: Map[A, Set[B]]): Relation[A, B]

Constructs a relation such that for every entry _1 -> _2s in forward and every _2 in _2s, (_1, _2) is in the relation.

Constructs a relation such that for every entry _1 -> _2s in forward and every _2 in _2s, (_1, _2) is in the relation.