Linear algebra and extended array routines.
Returns a new specialized array which is the concatenatation of 1 or more arrays along theaxis
dimension. All arrays must
have the same dimension, and all domains must have the same width
for each dimension except axis
.Returns a new specialized array which is the joining of 1 or more
arrays along a new axis
. All arrays must have the same
domain. The result will be one dimension larger, and axis
must fit within that dimension.Translates array
so that it's lower bounds are all zero.Shorthand for array-permute, swapping two dimensions.Returns true iff all arrays have the same domain, and all elements
in the same indexes are =
.Returns the 2-d identity matrix of size n
.Performs Gaussian elimination and returns the factor to apply to
the determinant.Returns the inverse of 2-d array a
, or #f
if a
is not invertible.Computes the determinant of 2-d array a
, mutating a
in
the process.Computes the determinant of 2-d array a
.Chained matrix multiplication. For a single array, returns that
array. For two arrays, performs normal matrix multiplication.
For more arrays, determines the optimal associativity and performs
the corresponding set of multiplications.Returns a
multiplied by itself pow
times.Returns the sum of all elements in array a
. Not a norm
because it can yield negative results.Returns the sum of the absolute values of all elements in array
a
. Aka the L1-norm, taxicab norm, or Manhattan norm.Returns the sum of the square of all elements in array a
.
Aka the L2-norm, Euclidean norm, Frobenius norm or square norm.Returns the sum of the absolute value of all elements in array
a
raised to the p
power. Aka the p-norm, this is the
generalized form of the above.Returns the maximum absolute value of all elements in array
a
. Aka the max norm or infinity norm.Returns the convolution of array a
using the given
kernel
.Nicely formatted printing for arrays of any rank. Ranks
higher than 2 are represented as successive 2D drawings.
Can generate box drawings with left:, right:, etc. keywords
specifying the strings to use. For example, Jacal-style
matrix output can be done with:
(pretty-print-array a #t 'left: "[" 'right: "]")
and a tic-tac-toe board can be printed with
(pretty-print-array a #t 'line-char: "|"
'top: "-" 'middle-col: "|" 'center-row: "-")