2020-12-26 01:47:55 +01:00
|
|
|
(* Type *)
|
|
|
|
|
|
|
|
|
2020-12-28 01:55:03 +01:00
|
|
|
(* [[file:~/QCaml/common/bitstring.org::*Type][Type:1]] *)
|
2020-12-26 01:47:55 +01:00
|
|
|
type t
|
|
|
|
(* Type:1 ends here *)
|
|
|
|
|
2020-12-27 23:08:12 +01:00
|
|
|
(* General implementation *)
|
2020-12-26 01:47:55 +01:00
|
|
|
|
|
|
|
|
2020-12-28 01:55:03 +01:00
|
|
|
(* [[file:~/QCaml/common/bitstring.org::*General%20implementation][General implementation:1]] *)
|
2020-12-26 01:47:55 +01:00
|
|
|
val of_int : int -> t
|
2020-12-27 23:08:12 +01:00
|
|
|
val of_z : Z.t -> t
|
|
|
|
val zero : int -> t
|
2020-12-26 01:47:55 +01:00
|
|
|
|
|
|
|
val is_zero : t -> bool
|
2020-12-27 23:08:12 +01:00
|
|
|
val numbits : t -> int
|
2020-12-26 01:47:55 +01:00
|
|
|
val testbit : t -> int -> bool
|
|
|
|
|
2020-12-27 23:08:12 +01:00
|
|
|
val neg : t -> t
|
|
|
|
val shift_left : t -> int -> t
|
|
|
|
val shift_right : t -> int -> t
|
|
|
|
val shift_left_one : int -> int -> t
|
2020-12-26 01:47:55 +01:00
|
|
|
|
2020-12-27 23:08:12 +01:00
|
|
|
val logor : t -> t -> t
|
2020-12-26 01:47:55 +01:00
|
|
|
val logxor : t -> t -> t
|
|
|
|
val logand : t -> t -> t
|
|
|
|
val lognot : t -> t
|
|
|
|
|
2020-12-27 23:08:12 +01:00
|
|
|
val plus_one : t -> t
|
2020-12-26 01:47:55 +01:00
|
|
|
val minus_one : t -> t
|
|
|
|
|
2020-12-27 23:08:12 +01:00
|
|
|
val hamdist : t -> t -> int
|
2020-12-26 01:47:55 +01:00
|
|
|
val trailing_zeros : t -> int
|
2020-12-27 23:08:12 +01:00
|
|
|
val popcount : t -> int
|
2020-12-26 01:47:55 +01:00
|
|
|
|
2020-12-27 23:08:12 +01:00
|
|
|
val to_list : ?accu:(int list) -> t -> int list
|
2020-12-26 01:54:39 +01:00
|
|
|
val permutations : int -> int -> t list
|
2020-12-27 23:08:12 +01:00
|
|
|
(* General implementation:1 ends here *)
|
2020-12-26 01:47:55 +01:00
|
|
|
|
2020-12-27 16:36:25 +01:00
|
|
|
(* Printers *)
|
2020-12-26 01:47:55 +01:00
|
|
|
|
|
|
|
|
2020-12-28 01:55:03 +01:00
|
|
|
(* [[file:~/QCaml/common/bitstring.org::*Printers][Printers:1]] *)
|
2020-12-26 01:47:55 +01:00
|
|
|
val pp : Format.formatter -> t -> unit
|
|
|
|
(* Printers:1 ends here *)
|