package prbnmcn-linalg

  1. Overview
  2. Docs
type 'a obj := 'a t
type ('a, 'b) t
val underlying : ('a, 'b) t -> 'a m -> 'b m
val domain : ('a, 'b) t -> 'a t
val range : ('a, 'b) t -> 'b t
val identity : 'a t -> ('a, 'a) t
val compose : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t
val tensor : ('a, 'b) t -> ('c, 'd) t -> ('a * 'c, 'b * 'd) t

tensor m1 m2 is the parallel composition of m1 and m2

val pullback_at_path : (pos, pos) t -> 'a Path.t -> 'a obj -> ('a, 'a) t k

pullback_at_path m p s extends m to s by constructing a morphism equal to m at p and acting as the identity on s elsewhere.

  • raises Dimensions_mismatch

    if range m is different from proj s p.

val pullback_pointwise : (pos, pos) t -> 'a obj -> ('a, 'a) t k

pullback_pointwise m s extends m to s by applying it pointwise to every position in

  • raises Dimensions_mismatch

    if any rank one sub-tensor of s is different from range m.

val sub : ofs:pos m -> pos obj -> pos obj -> (pos, pos) t k

sub ofs dom range constructs a morphism corresponding to the inclusion of dom, a rank-one tensor of dimension say m, into range, a rank-one tensor of dimension say n, such that the underlying positions of dom are mapped starting at index ofs in range.

Concretely, sub ofs dom range constructs a morphism mapping positions n in dom to positions n + ofs in range.

  • raises Dimensions_mismatch

    if ofs <= 0 || dim dom <= 0 || ofs + dim dom > dim range.