forked from marcoheisig/cl-isl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunion-set.lisp
More file actions
63 lines (50 loc) · 1.89 KB
/
union-set.lisp
File metadata and controls
63 lines (50 loc) · 1.89 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(in-package :cl-isl)
(define-isl-object union-set
:free %isl-union-set-free
:copy %isl-union-set-copy
:list-type union-set-list
:from-str t)
(defmethod print-object ((value union-set) stream)
(print-unreadable-object (value stream :type t)
(write-string (%isl-union-set-to-str (union-set-handle value)) stream)))
;; Creation
(define-isl-function union-set-empty %isl-union-set-empty
(:give union-set)
(:take space))
(define-isl-function union-set-universe %isl-union-set-universe
(:give union-set)
(:take space))
;; Conversion
(define-isl-function basic-set-union-set %isl-union-set-from-basic-set
(:give union-set)
(:take basic-set))
(define-isl-function set-union-set %isl-set-from-basic-set
(:give union-set)
(:take set))
;; Operations
;; (set, set) -> set
(macrolet ((def (name impl)
`(define-isl-function ,name ,impl
(:give union-set)
(:take union-set)
(:take union-set))))
(def union-set-intersect %isl-union-set-intersect)
(def union-set-union %isl-union-set-union)
(def union-set-subtract %isl-union-set-subtract)
(def union-set-product %isl-union-set-product)
(def union-set-lex-lt-union-set %isl-union-set-lex-lt-union-set)
(def union-set-lex-le-union-set %isl-union-set-lex-le-union-set)
(def union-set-lex-gt-union-set %isl-union-set-lex-gt-union-set)
(def union-set-lex-ge-union-set %isl-union-set-lex-ge-union-set))
(macrolet ((def (name impl)
`(define-isl-function ,name ,impl
(:give boolean)
(:take union-set)
(:take union-set))))
(def union-set-equalp %isl-union-set-is-equal)
(def union-set-subsetp %isl-union-set-is-subset)
(def union-set-strict-subset-p %isl-union-set-is-strict-subset))
(define-isl-function union-set-intersect-params %isl-union-set-intersect-params
(:give union-set)
(:take union-set)
(:take set params))