Linear algebra and extended array routines.
(array-append axis a . o)
Returns a new specialized array which is the concatenatation of 1
or more arrays along the
dimension. All arrays must
have the same dimension, and all domains must have the same width
for each dimension except
Returns a new specialized array which is the joining of 1 or more
arrays along a new
. All arrays must have the same
domain. The result will be one dimension larger, and
must fit within that dimension.
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
.Performs Gaussian elimination and returns the factor to apply to
Returns the inverse of 2-d array
is not invertible.Computes the determinant of 2-d array
Computes the determinant of 2-d array
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.
multiplied by itself
Returns the sum of all elements in array
. Not a norm
because it can yield negative results.
Returns the sum of the absolute values of all elements in array
. Aka the L1-norm, taxicab norm, or Manhattan norm.
Returns the sum of the square of all elements in array
Aka the L2-norm, Euclidean norm, Frobenius norm or square norm.
Returns the sum of the absolute value of all elements in array
raised to the
power. Aka the p-norm, this is the
generalized form of the above.
Returns the maximum absolute value of all elements in array
. Aka the max norm or infinity norm.
(array-convolve a kernel)
Returns the convolution of array
using the given
(pretty-print-array a . opt)
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: "-")