10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-02 03:15:19 +02:00
QCaml/common/lib/angular_momentum.mli

85 lines
1.7 KiB
OCaml

(* Type
*
* #+NAME: types *)
(* [[file:../angular_momentum.org::types][types]] *)
type t =
| S | P | D | F | G | H | I | J | K | L | M | N | O
| Int of int
exception Angular_momentum_error of string
type kind =
Singlet of t
| Doublet of (t * t)
| Triplet of (t * t * t)
| Quartet of (t * t * t * t)
(* types ends here *)
(* ~of_char~ *)
(* [[file:../angular_momentum.org::*~of_char~][~of_char~:1]] *)
val of_char : char -> t
(* ~of_char~:1 ends here *)
(* ~to_string~ *)
(* [[file:../angular_momentum.org::*~to_string~][~to_string~:1]] *)
val to_string : t -> string
(* ~to_string~:1 ends here *)
(* ~to_char~ *)
(* [[file:../angular_momentum.org::*~to_char~][~to_char~:1]] *)
val to_char : t -> char
(* ~to_char~:1 ends here *)
(* ~to_int~ *)
(* [[file:../angular_momentum.org::*~to_int~][~to_int~:1]] *)
val to_int : t -> int
(* ~to_int~:1 ends here *)
(* ~of_int~ *)
(* [[file:../angular_momentum.org::*~of_int~][~of_int~:1]] *)
val of_int : int -> t
(* ~of_int~:1 ends here *)
(* ~n_functions~ *)
(* [[file:../angular_momentum.org::*~n_functions~][~n_functions~:1]] *)
val n_functions : t -> int
(* ~n_functions~:1 ends here *)
(* ~zkey_array~ *)
(* [[file:../angular_momentum.org::*~zkey_array~][~zkey_array~:1]] *)
val zkey_array : kind -> Zkey.t array
(* ~zkey_array~:1 ends here *)
(* Arithmetic *)
(* [[file:../angular_momentum.org::*Arithmetic][Arithmetic:1]] *)
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
(* Arithmetic:1 ends here *)
(* Printers
*
* Printers can print as a string (~pp_string~) or as an integer (~pp_int~). *)
(* [[file:../angular_momentum.org::*Printers][Printers:1]] *)
val pp_string : Format.formatter -> t -> unit
val pp_int : Format.formatter -> t -> unit
(* Printers:1 ends here *)