package core_bench

  1. Overview
  2. Docs

Matrices

type t = float array array
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val copy : t -> t

Copy a matrix

val create0 : rows:int -> cols:int -> t

Create a matrix of 0s

val create_per_row : rows:int -> cols:int -> f:(int -> float) -> t
val get_column : t -> int -> Vec.t

Extract a column. Data is copied. Indices start at 0.

val almost_equal : tol:float -> t -> t -> bool

Comparison up to a tolerance for testing purposes.