module RingMap: functor (
M
:
sig
type 'a
t
type
key
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val enum : 'a t -> (key * 'a) BatEnum.t
val map : ('a -> 'b) -> 'a t -> 'b t
val find : key -> 'a t -> 'a
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val empty : 'a t
val merge : (key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
end
) ->
functor (
R
:
Ring
) ->
Vector
with type t = R.t M.t
and type dim = M.key
and type scalar = R.t
Lift a map type over a ring to a left-module
Parameters: |
M |
: |
sig
type 'a t
type key
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val enum : 'a t -> (key * 'a) BatEnum.t
val map : ('a -> 'b) -> 'a t -> 'b t
val find : key -> 'a t -> 'a
val add : key -> 'a -> 'a t -> 'a t
val remove : key -> 'a t -> 'a t
val empty : 'a t
val merge : (key -> 'a option -> 'b option -> 'c option) ->
'a t ->
'b t ->
'c t
end
|
R |
: |
Ring
|
|
type
t
type
dim
type
scalar
val equal : t -> t -> bool
val add : t -> t -> t
val scalar_mul : scalar -> t -> t
val negate : t -> t
val sub : t -> t -> t
val dot : t -> t -> scalar
val zero : t
val is_zero : t -> bool
val add_term : scalar ->
dim -> t -> t
val of_term : scalar -> dim -> t
val enum : t -> (scalar * dim) BatEnum.t
val of_enum : (scalar * dim) BatEnum.t -> t
val of_list : (scalar * dim) list -> t
val coeff : dim -> t -> scalar
val pivot : dim ->
t -> scalar * t