src/dense

Types

Matrix[M; N] = array[M, array[N, float]]
  Source Edit
Vector[M] = array[M, float]
  Source Edit

Procs

proc `$`(matrix: Matrix): string
  Source Edit
proc rows(matrix: Matrix): int
  Source Edit
proc cols(matrix: Matrix): int
  Source Edit
proc shape(matrix: Matrix): (int, int)
  Source Edit
proc `[]`(matrix: Matrix; row, col: int): float
  Source Edit
proc `[]=`(matrix: var Matrix; row, col: int; value: float)
  Source Edit
proc transpose[M, N](matrix: Matrix[M, N]): Matrix[N, M]
Compute the transpose of matrix.   Source Edit
proc `+`(a, b: Matrix): Matrix
  Source Edit
proc `+`[N](a, b: Vector[N]): Vector[N]
  Source Edit
proc `-`[N](a, b: Vector[N]): Vector[N]
  Source Edit
proc `*`[M, N](A: Matrix[M, N]; b: Vector[N]): Vector[M]
  Source Edit
proc `*`[M, P, N](a: Matrix[M, P]; b: Matrix[P, N]): Matrix[M, N]
  Source Edit
proc `*`(a: Matrix; b: float): Matrix
  Source Edit
proc `*`[N](a: float; b: Vector[N]): Vector[N]
  Source Edit
proc determinant(a: Matrix[2, 2]): float {...}{.raises: [], tags: [].}
Compute the determinant of a 2x2 matrix a.   Source Edit
proc inv(a: Matrix[2, 2]): Matrix[2, 2] {...}{.raises: [], tags: [].}
Compute the inverse of a 2x2 matrix a.   Source Edit