package prbnmcn-basic-structures

  1. Overview
  2. Docs

Make constructs an (OCaml) module to handle the free (algebraic) R-module generated by finite subsets of Basis. The implementation of free modules is backed by a map implementation M that must be provided by the user.

Parameters

module M : Map.S with type key = Basis.t

Signature

module R = R
type t = R.t M.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 = Basis
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.