From 3b8aeddbfbffadeb9f9b89a20d7582cbb64f2a04 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sun, 27 Jun 2010 09:16:16 -0400 Subject: [PATCH] Relation.make --- util/collection/Relation.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/collection/Relation.scala b/util/collection/Relation.scala index 170c82a74..ab31cdd06 100644 --- a/util/collection/Relation.scala +++ b/util/collection/Relation.scala @@ -6,7 +6,8 @@ package sbt object Relation { /** Constructs a new immutable, finite relation that is initially empty. */ - def empty[A,B]: Relation[A,B] = new MRelation[A,B](Map.empty, Map.empty) + def empty[A,B]: Relation[A,B] = make(Map.empty, Map.empty) + def make[A,B](forward: Map[A,Set[B]], reverse: Map[B, Set[A]]): Relation[A,B] = new MRelation(forward, reverse) } /** Binary relation between A and B. It is a set of pairs (_1, _2) for _1 in A, _2 in B. */ trait Relation[A,B]