package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type elt
type ('a, 'perm) t = (elt, 'a, 'perm) array_
val add : ?res:('a, [> `W ] as 'perm) t -> ('a, [> `R ]) t -> ('a, [> `R ]) t -> ('a, 'perm) t

Elementwise sum

val mult : ?res:('a, [> `W ] as 'perm) t -> ('a, [> `R ]) t -> ('a, [> `R ]) t -> ('a, 'perm) t

Elementwise product

val scalar_add : ?res:('a, [> `W ] as 'perm) t -> ('a, [> `R ]) t -> x:elt -> ('a, 'perm) t
val scalar_mult : ?res:('a, [> `W ] as 'perm) t -> ('a, [> `R ]) t -> x:elt -> ('a, 'perm) t
val sum_elt : (_, [> `R ]) t -> elt

Efficient sum of elements

val product_elt : (_, [> `R ]) t -> elt

Efficient product of elements

val dot_product : (_, [> `R ]) t -> (_, [> `R ]) t -> elt

dot_product a b returns sum_i a(i)*b(i) with the given sum and product, on elt. dot_product a b = sum_elt (product a b)

module Infix : sig ... end
include module type of Infix
val (*) : ('a, [> `R ]) t -> ('a, [> `R ]) t -> ('a, 'perm) t

Alias to mult

val (+) : ('a, [> `R ]) t -> (_, [> `R ]) t -> ('a, 'perm) t

Alias to add

val (*!) : ('a, [> `R ]) t -> elt -> ('a, 'perm) t

Alias to scalar_mult

val (+!) : ('a, [> `R ]) t -> elt -> ('a, 'perm) t

Alias to scalar_add

OCaml

Innovation. Community. Security.