package prbnmcn-basic-structures

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file basic_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
include Intf_std
include Intf_algebra
include Intf_monad
include Intf_infix
module Lang = Intf_lang

(** Metric space *)
module type Metric = sig
  include Std

  (** [dist] is expected to be a proper distance function (symmetric, zero on the diagonal,
      verifying the triangular inequality). *)
  val dist : t -> t -> float
end

(** Module type of anything that looks like the (measured) reals. *)
module type Reals = sig
  include Field_std

  (** Lebesgue on the interval [0;1] *)
  val lebesgue : Random.State.t -> t

  val ( + ) : t -> t -> t

  val ( - ) : t -> t -> t

  val ( * ) : t -> t -> t

  val ( / ) : t -> t -> t

  include Infix_order with type t := t and type 'a m := 'a

  (** [npow x n] is [x] tp the power of [n]. *)
  val npow : t -> int -> t

  val to_float : t -> float

  val of_float : float -> t

  val of_int : int -> t
end
OCaml

Innovation. Community. Security.