package prbnmcn-basic-structures

  1. Overview
  2. Docs

Make_with_map constructs a free R-module over X, instsan

Parameters

module X : Basic_intf.Std

Signature

type r = R.t
module Map : Stdlib.Map.S with type key = X.t
include Basic_intf.Free_module_std with type R.t = r and type Basis.t = Map.key and type t = r Map.t
module R : sig ... end
type t = r Map.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 : Stdlib.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.