Mercurial > urweb
changeset 2219:ff38b3e0cdfd
Add interface to UnionFind.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Mon, 24 Nov 2014 20:41:24 -0500 |
parents | f7113855f3b7 |
children | 794017f378de |
files | src/sqlcache.sml src/union_find_fn.sml |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sqlcache.sml Tue Nov 11 04:25:20 2014 -0500 +++ b/src/sqlcache.sml Mon Nov 24 20:41:24 2014 -0500 @@ -341,6 +341,7 @@ fn Sql.Insert tableVals => valsToFormula tableVals | Sql.Delete (table, wher) => renameTables [(table, "T")] (sqexpToFormula wher) (* TODO: refine formula for the vals part, which could take into account the wher part. *) + (* TODO: use pushNegate instead of mapFormulaSigned? *) | Sql.Update (table, vals, wher) => let val f = sqexpToFormula wher
--- a/src/union_find_fn.sml Tue Nov 11 04:25:20 2014 -0500 +++ b/src/union_find_fn.sml Mon Nov 24 20:41:24 2014 -0500 @@ -1,4 +1,10 @@ -functor UnionFindFn(K : ORD_KEY) = struct +functor UnionFindFn(K : ORD_KEY) :> sig + type unionFind + val empty : unionFind + val union : unionFind * K.ord_key * K.ord_key -> unionFind + val union' : (K.ord_key * K.ord_key) * unionFind -> unionFind + val classes : unionFind -> K.ord_key list list +end = struct structure M = BinaryMapFn(K) structure S = BinarySetFn(K)