sidekick/src/algos/simplex/predicate.ml
Simon Cruanes 6dca63b0ea
renamings
2022-07-18 23:27:12 -04:00

27 lines
426 B
OCaml

type t = Leq | Geq | Lt | Gt | Eq | Neq
let neg = function
| Leq -> Gt
| Lt -> Geq
| Eq -> Neq
| Neq -> Eq
| Geq -> Lt
| Gt -> Leq
let neg_sign = function
| Leq -> Geq
| Lt -> Gt
| Geq -> Leq
| Gt -> Lt
| Neq -> Neq
| Eq -> Eq
let to_string = function
| Leq -> "=<"
| Geq -> ">="
| Lt -> "<"
| Gt -> ">"
| Eq -> "="
| Neq -> "!="
let pp out (self : t) = Fmt.string out (to_string self)