package lacaml

  1. Overview
  2. Docs

Types and functions common to all precision dependent sub-modules.

Lacaml.common contains definitions independent of the precision.

type trans2 = [
  1. | `N
  2. | `T
]

Transpose parameter (normal or transposed)

type side = [
  1. | `L
  2. | `R
]

Side parameter (left or right)

type diag = [
  1. | `U
  2. | `N
]

Diagonal parameter (unit or non-unit)

type norm2 = [
  1. | `O
  2. | `I
]

Type of 1-norm (`O) and infinity norm (`I)

type norm4 = [
  1. | norm2
  2. | `M
  3. | `F
]

Type of 1-norm (`O), infinity norm (`I) and the Frobenius norm (`F). `M is the maximum of the absolute values (not a true matrix norm).

type svd_job = [
  1. | `A
  2. | `S
  3. | `O
  4. | `N
]

SVD computation flags

type schur_vectors = [
  1. | `No_Schur_vectors
  2. | `Compute_Schur_vectors
]

GEES job option

type eigen_value_sort = [
  1. | `No_sort
  2. | `Select_left_plane
  3. | `Select_right_plane
  4. | `Select_interior_disk
  5. | `Select_exterior_disk
  6. | `Select_custom of Stdlib.Complex.t -> bool
]

GEES eigenvalue sort option

exception InternalError of string

InternalError msg gets raised when BLAS or LAPACK exhibit undefined behaviour.

type int_vec = (int, Stdlib.Bigarray.int_elt, Stdlib.Bigarray.fortran_layout) Stdlib.Bigarray.Array1.t

Type of OCaml integer vectors.

val create_int_vec : int -> int_vec

create_int_vec n

  • returns

    an int-vector with n rows.

type int32_vec = (int32, Stdlib.Bigarray.int32_elt, Stdlib.Bigarray.fortran_layout) Stdlib.Bigarray.Array1.t

Type of 32bit Fortran integer vectors.

val create_int32_vec : int -> int32_vec

create_int32_vec n

  • returns

    an int32-vector with n rows.

val mat_from_vec : ('a, 'b, 'c) Stdlib.Bigarray.Array1.t -> ('a, 'b, 'c) Stdlib.Bigarray.Array2.t

mat_from_vec a converts the vector a into a matrix with Array1.dim a rows and 1 column. The data is shared between the two matrices.

Common types used for vector and matrix operations

module Types : sig ... end