10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-08-29 15:53:41 +02:00
QCaml/common/lib/charge.mli

50 lines
1.1 KiB
OCaml
Raw Normal View History

2020-12-27 13:43:55 +01:00
(* Type
*
* This type should be used for all charges in the program (electrons, nuclei,...). *)
2018-03-03 21:33:32 +01:00
2018-01-02 22:02:01 +01:00
2020-12-27 13:43:55 +01:00
(* [[file:../charge.org::*Type][Type:1]] *)
type t
(* Type:1 ends here *)
2018-01-02 22:02:01 +01:00
2020-12-27 13:43:55 +01:00
(* ~of_float~ / ~to_float~ *)
(* [[file:../charge.org::*~of_float~ / ~to_float~][~of_float~ / ~to_float~:1]] *)
2018-03-16 00:23:47 +01:00
val of_float : float -> t
2020-12-27 13:43:55 +01:00
val to_float : t -> float
(* ~of_float~ / ~to_float~:1 ends here *)
(* ~of_int~ / ~to_int~ *)
(* [[file:../charge.org::*~of_int~ / ~to_int~][~of_int~ / ~to_int~:1]] *)
2018-01-02 22:02:01 +01:00
val of_int : int -> t
2020-12-27 13:43:55 +01:00
val to_int : t -> int
(* ~of_int~ / ~to_int~:1 ends here *)
(* ~of_string~ / ~to_string~ *)
(* [[file:../charge.org::*~of_string~ / ~to_string~][~of_string~ / ~to_string~:1]] *)
2018-03-16 00:23:47 +01:00
val of_string: string -> t
2020-12-27 13:43:55 +01:00
val to_string: t -> string
(* ~of_string~ / ~to_string~:1 ends here *)
2018-01-02 22:02:01 +01:00
2020-12-27 13:43:55 +01:00
(* Simple operations *)
2018-03-16 00:23:47 +01:00
2018-03-03 22:13:14 +01:00
2020-12-27 13:43:55 +01:00
(* [[file:../charge.org::*Simple operations][Simple operations:1]] *)
2018-03-03 22:13:14 +01:00
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> float -> t
2020-12-27 13:43:55 +01:00
val ( / ) : t -> float -> t
(* Simple operations:1 ends here *)
2018-03-03 22:13:14 +01:00
2020-12-27 13:43:55 +01:00
(* Printers *)
2018-03-16 00:23:47 +01:00
2020-12-27 13:43:55 +01:00
(* [[file:../charge.org::*Printers][Printers:1]] *)
val pp : Format.formatter -> t -> unit
(* Printers:1 ends here *)