package prbnmcn-basic-structures

  1. Overview
  2. Docs
module R : sig ... end
type t
val zero : t
val add : t -> t -> t
val neg : t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val pp : Format.formatter -> t -> unit
val hash : t -> int
val smul : R.t -> t -> t
module Basis : sig ... end
type basis = Basis.t
val delta : basis -> t

"Dirac" delta

val eval : t -> basis -> R.t

Project the coefficient corresponding to a basis vector.

val bind : t -> (basis -> t) -> t

bind = canonical, "multilinear" extension

val of_list : (basis * R.t) list -> t

of_list [(x1,r1);...;(xn,rn)] is equivalent to add (smul r1 (delta x1)) (add (smul r2 (delta x2)) (add ... (smul rn (delta xn))))

val fold : (basis -> R.t -> 'a -> 'a) -> t -> 'a -> 'a

Fold over the elements of a vector. Order is not specified.

OCaml

Innovation. Community. Security.