10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-23 12:53:46 +01:00
QCaml/common/lib/zkey.mli

62 lines
1.3 KiB
OCaml
Raw Normal View History

2024-01-17 13:59:05 +01:00
(** Types *)
2018-03-03 21:19:50 +01:00
2024-01-17 13:59:05 +01:00
type t
2018-03-03 21:19:50 +01:00
type kind =
| Three of Powers.t
2018-06-29 16:04:40 +02:00
| Four of (int * int * int * int)
2018-03-03 21:19:50 +01:00
| Six of (Powers.t * Powers.t)
| Nine of (Powers.t * Powers.t * Powers.t)
| Twelve of (Powers.t * Powers.t * Powers.t * Powers.t)
2018-06-29 16:04:40 +02:00
2024-01-17 13:59:05 +01:00
(** Conversions *)
2018-03-03 21:19:50 +01:00
2020-12-28 01:08:55 +01:00
val of_powers_three : Powers.t -> t
2024-01-17 13:59:05 +01:00
(** Create from a ~Powers.t~ *)
2020-12-28 01:08:55 +01:00
val of_powers_six : Powers.t -> Powers.t -> t
2024-01-17 13:59:05 +01:00
(** Create from two ~Powers.t~ *)
2020-12-28 01:08:55 +01:00
val of_powers_nine : Powers.t -> Powers.t -> Powers.t -> t
2024-01-17 13:59:05 +01:00
(** Create from three ~Powers.t~ *)
2020-12-28 01:08:55 +01:00
val of_powers_twelve : Powers.t -> Powers.t -> Powers.t -> Powers.t -> t
2024-01-17 13:59:05 +01:00
(** Create from four ~Powers.t~ *)
2020-12-28 01:08:55 +01:00
val of_powers : kind -> t
2024-01-17 13:59:05 +01:00
(** Create using the ~kind~ type *)
2020-12-28 01:08:55 +01:00
val of_int_array : int array -> t
2024-01-17 13:59:05 +01:00
(** Convert from an ~int~ array *)
2020-12-28 01:08:55 +01:00
val of_int_four : int -> int -> int -> int -> t
2024-01-17 13:59:05 +01:00
(** Create from four ~ints~ *)
2020-12-28 01:08:55 +01:00
val to_int_array : t -> int array
2024-01-17 13:59:05 +01:00
(** Convert to an ~int~ array *)
2020-12-28 01:08:55 +01:00
val to_powers : t -> kind
2024-01-17 13:59:05 +01:00
(** Convert to an ~Powers.t~ array *)
2020-12-28 01:08:55 +01:00
val to_string : t -> string
2024-01-17 13:59:05 +01:00
(** Pretty printing *)
2018-03-03 21:19:50 +01:00
2024-01-17 13:59:05 +01:00
(** Functions for hash tables *)
2018-03-03 21:19:50 +01:00
2020-12-28 01:08:55 +01:00
val hash : t -> int
2024-01-17 13:59:05 +01:00
(** Associates a nonnegative integer to any Zkey *)
2020-12-28 01:08:55 +01:00
val equal : t -> t -> bool
2024-01-17 13:59:05 +01:00
(** The equal function. True if two Zkeys are equal *)
2018-03-03 21:19:50 +01:00
val compare : t -> t -> int
2024-01-17 13:59:05 +01:00
(** Comparison function, used for sorting *)
2020-12-28 01:08:55 +01:00
2018-03-03 21:19:50 +01:00
2024-01-17 13:59:05 +01:00
(** Printers *)
2018-03-13 18:24:00 +01:00
2020-12-28 01:08:55 +01:00
val pp : Format.formatter -> t -> unit
2024-01-17 13:59:05 +01:00