package bimage

  1. Overview
  2. Docs

Module Bimage.TypeSource

Sourcemodule type TYPE = sig ... end
Sourcetype ('a, 'b) t = (module TYPE with type elt = 'b and type t = 'a)
Sourceval of_kind : ('a, 'b) Bigarray.kind -> ('a, 'b) t
Sourceval kind : ('a, 'b) t -> ('a, 'b) Bigarray.kind

Get Bigarray kind

Sourceval name : ('a, 'b) t -> string

name k returns the name of a given ty

Sourceval depth : ('a, 'b) t -> int

returns the number of bits for a given ty

Sourceval max : ('a, 'b) t -> 'a

max k returns the maximum normalized value for k

Sourceval min : ('a, 'b) t -> 'a

min k returns the minimum normalized value for k

Sourceval max_f : ('a, 'b) t -> float

max k returns the maximum normalized value for k as a float

Sourceval min_f : ('a, 'b) t -> float

min k returns the minimum normalized value for k as a float

Sourceval to_float : ('a, 'b) t -> 'a -> float

to_float k x converts a value of type k to float

Sourceval of_float : ('a, 'b) t -> float -> 'a

of_float k x converts a float to a value of ty k

Sourceval clamp : ('a, 'b) t -> float -> float

Converts a float value to a value within the proper range for the given type

Sourceval normalize : ('a, 'b) t -> float -> float

Scales a value to the range 0.0-1.0

Sourceval denormalize : ('a, 'b) t -> float -> float

Sclaes a value to the range (type_min-type_max)

Sourceval convert : from:('a, 'b) t -> ('c, 'd) t -> 'a -> 'c

Convert a value of one type to another

Sourceval u8 : (int, u8) t
Sourceval u16 : (int, u16) t
Sourceval i32 : (int32, i32) t
Sourceval i64 : (int64, i64) t
Sourceval f32 : (float, f32) t
Sourceval f64 : (float, f64) t
OCaml

Innovation. Community. Security.