prbnmcn-basic-structures

Base package for prbnmcn-* packages
Library prbnmcn-basic-structures

Parameters

module X : Basic_intf.Std

Signature

type r = R.t
module Map : 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
include Basic_intf.Module_std with type R.t = r with type t = r Map.t
module R : Basic_intf.Ring_std with type t = r
type t = r Map.t
include Basic_intf.Abelian_group_std with type t := t
include Basic_intf.Abelian_group with type t := 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.