Module type Intf.Tensor
Module type of tensor shapes.
include Basic_structures.Basic_intf.Lang.Shape
val pos_equal : 'a t -> 'a m -> 'a m -> bool m
pos_equal s p p'
is true iffp
andp'
are equal positions in the shapes
.
module type Storage = Basic_structures.Basic_intf.Lang.Storage with type 'a m = 'a m
First-class mutable storage.
module Morphism : sig ... end
Shape morphisms, described as a category.
module Path : sig ... end
The type of
Path.t
allows to specify a rank-one sub-tensor out of a rank-n tensor.
val proj : 'a t -> 'a Path.t -> pos t
proj s p
is the rank one component ofs
at the path specified byp
.
val dim : 'a t -> 'a Path.t -> pos m
Dimension along a one-dimensional slice specified by the given path.
val concat : 'a t -> 'a t -> 'a Path.t -> 'a t k
concat s1 s2 p
concatenatess1
ands2
along the dimension specified by the pathp
.- raises Dimensions_mismatch
if
s1
ands2
have a different shape along the orthogonal complement top
.
module Morphism : sig ... end