/[svn]/types/intervals.ml
ViewVC logotype

Diff of /types/intervals.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 262 by abate, Tue Jul 10 17:18:04 2007 UTC revision 263 by abate, Tue Jul 10 17:20:36 2007 UTC
# Line 19  Line 19 
19    
20  type t = interval list  type t = interval list
21    
22    
23  let rec equal l1 l2 =  let rec equal l1 l2 =
24    (l1 == l2) ||    (l1 == l2) ||
25    match (l1,l2) with    match (l1,l2) with
# Line 84  Line 85 
85    | Bounded (a1,b1) :: l' ->    | Bounded (a1,b1) :: l' ->
86        iadd_bounded l' (min_big_int a a1) (max_big_int b b1)        iadd_bounded l' (min_big_int a a1) (max_big_int b b1)
87    | Left b1 :: l' ->    | Left b1 :: l' ->
88        iadd_left l' b        iadd_left l' (max_big_int b b1)
89    | Right a1 :: _ -> [Right (min_big_int a a1)]    | Right a1 :: _ -> [Right (min_big_int a a1)]
90    | Any :: _ -> any    | Any :: _ -> any
91    
# Line 202  Line 203 
203    
204  let sub l1 l2 =  let sub l1 l2 =
205    add l1 (negat l2)    add l1 (negat l2)
206    
207    (*
208    let dump s i =
209      let ppf = Format.std_formatter in
210      Format.fprintf ppf "%s = [ " s;
211      List.iter (fun x -> x ppf; Format.fprintf ppf " ") (print i);
212      Format.fprintf ppf "] "
213    
214    let diff i1 i2 =
215      let ppf = Format.std_formatter in
216      Format.fprintf ppf "Intervals.diff.";
217      dump "i1" i1;
218      dump "i2" i2;
219      dump "~i1|i2" (cup (neg i1) i2);
220      Format.fprintf ppf "@\n";
221      diff i1 i2
222    *)

Legend:
Removed from v.262  
changed lines
  Added in v.263

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5