You can subscribe to this list here.
2002 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}
(16) 
_{Jun}
(29) 
_{Jul}
(1) 
_{Aug}
(9) 
_{Sep}
(10) 
_{Oct}

_{Nov}

_{Dec}
(1) 

S  M  T  W  T  F  S 


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26
(1) 
27

28

29

30

31




From: <yori@us...>  20020726 20:22:29

Update of /cvsroot/camomile/camomile/internal In directory uswprcvs1:/tmp/cvsserv13402 Added Files: interval.ml Log Message: beginning of the work.  NEW FILE: interval.ml  (* $Id: interval.ml,v 1.1 2002/07/26 20:22:25 yori Exp $ *) (* Copyright 2002 Yamagata Yoriyuki *) (* same as Set.OrderType, Map.OrderType *) module type OrderType = sig type t val compare : t > t > int end module Make (Ord : OrderType) = struct type point = `Point of Ord.t  `Top  `Bottom let compare_point p1 p2 = match p1, p2 with `Bottom, `Bottom > 0  `Bottom, _ > 1  _, `Bottom > 1  `Top, `Top > 0  `Top, _ > 1  _, `Top > 1  `Point e1, `Point e2 > Ord.compare e1 e2 type polarity = Open  Closed let compare_polarity x1 x2 = match x1, x2 with Closed, Closed > 0  Closed, Open > 1  Open, Closed > 1  Open, Open > 0 type interval = `Empty  `Point of Ord.t  `Top  `Bottom  `Range of point * polarity * point * polarity let compare_aux p r = match p, r with `Point _ as p, `Range (p1, x1, p2, x2) > let y = compare p p1 in if y <> 0 then y else (match x1 with Open > 1  Closed > compare p p2) let compare r1 r2 = match r1, r2 with `Empty, `Empty > 0  `Empty, _ > 1  _, `Empty > 1  (`Point _  `Top  `Bottom), (`Point _  `Top  `Bottom) > compare_point r1 r2  `Point _ , `Range (_, _, _, _) > compare_aux r1 r2  `Range (_, _, _, _), `Point _ > ~ compare_aux x2 x1  `Range (p1, x1, p2, x2), `Range (p3, x3, p4, x4) > let y = compare_point p1 p3 in if y <> 0 then y else let z = compare_polarity x1 x3 in if z <> 0 then z else let y' = compare_point p1 p3 in if y' <> 0 then y' else ~ compare_polarity x2 x4 let merge r1 r2 = (* let normalize rs = let rec loop r1 rs = match rs with [] > []  r2 :: rest > match r1, r2 with `Empty, _ > loop r2 rest  _, `Empty > loop r1 rest  `Range (p1, x1, p2, x2), `Range (p3, x3, p4, x4) > let y = compare_point p2 p3 in if y < 0  y = 0 && x2 = Open && x3 = Open then r1 :: (loop r2 rest) else let z = compare_point p2 p4 in if z > 0 then loop (`Range (p1, x1, p2, x2)) rest else if z = 0 then let x = match x2, x4 with Closed, _  _, Closed > Closed  _ > Open in loop (`Range (p1, x1, p2, x)) rest else loop (`Range (p1, x1, p4, x4)) rest  (`Point _  `Top  `Bottom) as p, `Range (p1, x1, p2, x2) > let y = compare_point p p1 in if y < 0  y = 0 && x1 = Open then r1 :: (loop r2 rest) else loop r2 rest  `Range (p1, x1, p2, x2), (`Point _  `Top  `Bottom) as p > let y = compare_point p2 p in if y < 0  y = 0 && x2 = Open then r1 :: (loop r2 rest) else loop r1 rest  (`Point _  `Top  `Bottom) as p1, (`Point _  `Top  `Bottom) as p2> if compare_point p1 p2 = 0 then loop r1 rest else r1 :: (loop r2 rest) in let rs' = List.sort compare rs in match rs' with [] > []  r :: rest > loop r rest let subset_interval r1 r2 = match r1, r2 with `Empty, _ > true  `Range (p1, x1, p2, x2), `Range (p3, x3, p4, x4) > compare_point p1 p3 >= 0 && compare_polarity x1 x2 >= 0 && compare_point p2 p4 <= 0 && compare_polarity x2 x4 >= 0  (`Point _  `Top  `Bottom) as p, `Range (p1, x1, p2, x2) > let y = compare p p1 in subset_range (`Range (r1, Closed, r1, Closed)) r2  `Range (_, _, _, _), (`Point _  `Top  `Bottom) > subset_range r1 (`Range (r2, Closed, r2, Closed))  (`Point _  `Top  `Bottom), (`Point _  `Top  `Bottom) > subset_range (`Range (r1, Closed, r1, Closed)) (`Range (r2, Closed, r2, Closed)) let rec subset rs1 rs2 = let rs1 = normalize rs1 in let rs2 = mormalize rs2 in match rs1. rs2 with [], _ > true  `Empty :: rest, _ > subset rest rs2  _, [] > false  _, `Empty :: rest > subset rs1 rest  (`Point _  `Top  `Bottom) as p1 :: rest1, (`Point _  `Top  `Bottom) as p2 :: rest2 > let y = compare_point p1 p2 in if y < 0 then false else if y = 0 then subset rest1 rs2 else subset rs1 rest2  (`Point _  `Top  `Bottom) as p1 :: rest1, `Range (p2, x2, p3, x3) :: rest2 > let y = compare_point p1 p2 in if y < 0 then false else if y = 0 then if x2 = Open then false else subset rest1 rs2 else let z = compare_point p1 p3 in if z < 0  z = 0 && x3 = Closed then subset rest1 rs2 else subset rs1 rest2  `Range (p1, x1, p2, x2) :: rest1, (`Point _  `Top  `Bottom) as p3 :: rest2 > let y = compare_point p1 p3 in if y < 0 then false else if y = 0 && x1 = Closed && compare_point p2 p3 = 0 && x2 = Closed then subset rest1 rs2 else subset rs1 rest2  `Range (p1, x1, p2, x2) :: rest1, `Range (p3, x3, p4, x4) :: rest2, *) end 