This is the 3d-matrices Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:10:06 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
3d-matrices
A utility library implementing 2x2, 3x3, 4x4, and NxN matrix functionality.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/3d-matrices.git)
zlib
1.0.0
documentation-utils
(system).
3d-vectors
(system).
package.lisp
(file).
toolkit.lisp
(file).
struct.lisp
(file).
iterate.lisp
(file).
ops.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
3d-matrices/3d-matrices.asd
3d-matrices/package.lisp
3d-matrices/toolkit.lisp
3d-matrices/struct.lisp
3d-matrices/iterate.lisp
3d-matrices/ops.lisp
3d-matrices/documentation.lisp
3d-matrices/toolkit.lisp
package.lisp
(file).
3d-matrices
(system).
*eps*
(special variable).
*matrix-limit*
(special variable).
ensure-function
(function).
intern*
(function).
mat-dim
(type).
with-floats
(macro).
~/=
(function).
~=
(function).
3d-matrices/struct.lisp
toolkit.lisp
(file).
3d-matrices
(system).
describe-object
(method).
describe-object
(method).
describe-object
(method).
describe-object
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
make-load-form
(method).
marr
(function).
marr2
(reader).
(setf marr2)
(writer).
marr3
(reader).
(setf marr3)
(writer).
marr4
(reader).
(setf marr4)
(writer).
marrn
(reader).
(setf marrn)
(writer).
mat
(compiler macro).
mat
(function).
mat
(type).
mat-p
(function).
mat2
(compiler macro).
mat2
(function).
mat2
(structure).
mat2-p
(function).
mat3
(compiler macro).
mat3
(function).
mat3
(structure).
mat3-p
(function).
mat4
(compiler macro).
mat4
(function).
mat4
(structure).
mat4-p
(function).
matf
(compiler macro).
matf
(function).
matn
(compiler macro).
matn
(function).
matn
(structure).
matn-p
(function).
mcols
(function).
mcopy
(function).
mcopy2
(function).
mcopy3
(function).
mcopy4
(function).
mcopyn
(function).
(setf mcref)
(setf expander).
mcref
(function).
(setf mcref2)
(setf expander).
mcref2
(function).
(setf mcref3)
(setf expander).
mcref3
(function).
(setf mcref4)
(setf expander).
mcref4
(function).
(setf mcrefn)
(setf expander).
mcrefn
(function).
(setf miref)
(setf expander).
miref
(function).
(setf miref2)
(setf expander).
miref2
(function).
(setf miref3)
(setf expander).
miref3
(function).
(setf miref4)
(setf expander).
miref4
(function).
(setf mirefn)
(setf expander).
mirefn
(function).
mrows
(function).
print-object
(method).
print-object
(method).
print-object
(method).
print-object
(method).
write-matrix
(function).
%cols
(reader).
(setf %cols)
(writer).
%mat2
(function).
%mat3
(function).
%mat4
(function).
%matn
(function).
%mka
(macro).
%proper-array
(macro).
%proper-array-form
(function).
%rows
(reader).
(setf %rows)
(writer).
define-describe-matrix
(macro).
define-mat-accessor
(macro).
3d-matrices/iterate.lisp
struct.lisp
(file).
3d-matrices
(system).
do-mat-diag
(macro).
do-mat-index
(macro).
map-mat-diag
(function).
map-mat-index
(function).
3d-matrices/ops.lisp
iterate.lisp
(file).
3d-matrices
(system).
m*
(compiler macro).
m*
(function).
m+
(compiler macro).
m+
(function).
m-
(compiler macro).
m-
(function).
m/
(compiler macro).
m/
(function).
m/=
(compiler macro).
m/=
(function).
m1norm
(function).
m2norm
(function).
m<
(compiler macro).
m<
(function).
m<=
(compiler macro).
m<=
(function).
m=
(compiler macro).
m=
(function).
m>
(compiler macro).
m>
(function).
m>=
(compiler macro).
m>=
(function).
madj
(function).
mapply
(function).
mapplyf
(function).
mblock
(function).
mbottom
(function).
mcof
(function).
mcofactor
(function).
mcol
(function).
(setf mcol)
(function).
mdet
(function).
mdiag
(function).
meigen
(function).
meye
(function).
mfrustum
(function).
minorm
(function).
minv
(function).
minv-affine
(function).
mleft
(function).
mlookat
(function).
mlu
(function).
mminor
(function).
mortho
(function).
mperspective
(function).
mpivot
(function).
mqr
(function).
mrand
(function).
mright
(function).
mrotation
(function).
mrow
(function).
(setf mrow)
(function).
mscaling
(function).
msetf
(macro).
mtop
(function).
mtrace
(function).
mtranslation
(function).
mtranspose
(function).
muniform
(function).
m~=
(compiler macro).
m~=
(function).
n*m
(compiler macro).
n*m
(function).
nm*
(compiler macro).
nm*
(function).
nm+
(compiler macro).
nm+
(function).
nm-
(compiler macro).
nm-
(function).
nm/
(compiler macro).
nm/
(function).
nmlookat
(function).
nmrotate
(function).
nmscale
(function).
nmswap-col
(function).
nmswap-row
(function).
nmtranslate
(function).
nmtranspose
(function).
with-fast-matcase
(macro).
with-fast-matref
(macro).
with-fast-matrefs
(macro).
%2mat*-expansion
(macro).
%2mat-op
(macro).
%2mat/-expansion
(macro).
%2n*mat-expansion
(macro).
%2nmat*-expansion
(macro).
%2nmat/-expansion
(macro).
%mrotation
(function).
2mat-m*
(function).
2mat-m+
(function).
2mat-m-
(function).
2mat-m/
(function).
2mat-m/=
(function).
2mat-m<
(function).
2mat-m<=
(function).
2mat-m=
(function).
2mat-m>
(function).
2mat-m>=
(function).
2mat-m~=
(function).
2mat-n*m
(function).
2mat-nm*
(function).
2mat-nm+
(function).
2mat-nm-
(function).
2mat-nm/
(function).
define-matcomp
(macro).
define-matop
(macro).
define-nmatop
(macro).
mswap-col
(function).
mswap-row
(function).
3d-matrices/documentation.lisp
ops.lisp
(file).
3d-matrices
(system).
Packages are listed by definition order.
3d-matrices
org.shirakumo.flare.matrix
3d-vectors
.
common-lisp
.
m*
(compiler macro).
m*
(function).
m+
(compiler macro).
m+
(function).
m-
(compiler macro).
m-
(function).
m/
(compiler macro).
m/
(function).
m/=
(compiler macro).
m/=
(function).
m1norm
(function).
m2norm
(function).
m<
(compiler macro).
m<
(function).
m<=
(compiler macro).
m<=
(function).
m=
(compiler macro).
m=
(function).
m>
(compiler macro).
m>
(function).
m>=
(compiler macro).
m>=
(function).
madj
(function).
mapply
(function).
mapplyf
(function).
marr
(function).
marr2
(reader).
(setf marr2)
(writer).
marr3
(reader).
(setf marr3)
(writer).
marr4
(reader).
(setf marr4)
(writer).
marrn
(reader).
(setf marrn)
(writer).
mat
(compiler macro).
mat
(function).
mat
(type).
mat-p
(function).
mat2
(compiler macro).
mat2
(function).
mat2
(structure).
mat2-p
(function).
mat3
(compiler macro).
mat3
(function).
mat3
(structure).
mat3-p
(function).
mat4
(compiler macro).
mat4
(function).
mat4
(structure).
mat4-p
(function).
matf
(compiler macro).
matf
(function).
matn
(compiler macro).
matn
(function).
matn
(structure).
matn-p
(function).
mblock
(function).
mbottom
(function).
mcof
(function).
mcofactor
(function).
mcol
(function).
(setf mcol)
(function).
mcols
(function).
mcopy
(function).
mcopy2
(function).
mcopy3
(function).
mcopy4
(function).
mcopyn
(function).
(setf mcref)
(setf expander).
mcref
(function).
(setf mcref2)
(setf expander).
mcref2
(function).
(setf mcref3)
(setf expander).
mcref3
(function).
(setf mcref4)
(setf expander).
mcref4
(function).
(setf mcrefn)
(setf expander).
mcrefn
(function).
mdet
(function).
mdiag
(function).
meigen
(function).
meye
(function).
mfrustum
(function).
minorm
(function).
minv
(function).
minv-affine
(function).
(setf miref)
(setf expander).
miref
(function).
(setf miref2)
(setf expander).
miref2
(function).
(setf miref3)
(setf expander).
miref3
(function).
(setf miref4)
(setf expander).
miref4
(function).
(setf mirefn)
(setf expander).
mirefn
(function).
mleft
(function).
mlookat
(function).
mlu
(function).
mminor
(function).
mortho
(function).
mperspective
(function).
mpivot
(function).
mqr
(function).
mrand
(function).
mright
(function).
mrotation
(function).
mrow
(function).
(setf mrow)
(function).
mrows
(function).
mscaling
(function).
msetf
(macro).
mtop
(function).
mtrace
(function).
mtranslation
(function).
mtranspose
(function).
muniform
(function).
m~=
(compiler macro).
m~=
(function).
n*m
(compiler macro).
n*m
(function).
nm*
(compiler macro).
nm*
(function).
nm+
(compiler macro).
nm+
(function).
nm-
(compiler macro).
nm-
(function).
nm/
(compiler macro).
nm/
(function).
nmlookat
(function).
nmrotate
(function).
nmscale
(function).
nmswap-col
(function).
nmswap-row
(function).
nmtranslate
(function).
nmtranspose
(function).
with-fast-matcase
(macro).
with-fast-matref
(macro).
with-fast-matrefs
(macro).
write-matrix
(function).
%2mat*-expansion
(macro).
%2mat-op
(macro).
%2mat/-expansion
(macro).
%2n*mat-expansion
(macro).
%2nmat*-expansion
(macro).
%2nmat/-expansion
(macro).
%cols
(reader).
(setf %cols)
(writer).
%mat2
(function).
%mat3
(function).
%mat4
(function).
%matn
(function).
%mka
(macro).
%mrotation
(function).
%proper-array
(macro).
%proper-array-form
(function).
%rows
(reader).
(setf %rows)
(writer).
*eps*
(special variable).
*matrix-limit*
(special variable).
2mat-m*
(function).
2mat-m+
(function).
2mat-m-
(function).
2mat-m/
(function).
2mat-m/=
(function).
2mat-m<
(function).
2mat-m<=
(function).
2mat-m=
(function).
2mat-m>
(function).
2mat-m>=
(function).
2mat-m~=
(function).
2mat-n*m
(function).
2mat-nm*
(function).
2mat-nm+
(function).
2mat-nm-
(function).
2mat-nm/
(function).
define-describe-matrix
(macro).
define-mat-accessor
(macro).
define-matcomp
(macro).
define-matop
(macro).
define-nmatop
(macro).
do-mat-diag
(macro).
do-mat-index
(macro).
ensure-function
(function).
intern*
(function).
map-mat-diag
(function).
map-mat-index
(function).
mat-dim
(type).
mswap-col
(function).
mswap-row
(function).
with-floats
(macro).
~/=
(function).
~=
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Does an etypecase on MAT and an appropriate WITH-FAST-MATREF on each case.
The body should be an expression of (MAT-TYPE form*). For each
matrix type /except/ for MATN, the forms will be wrapped in an
appropriate WITH-FAST-MATREF. This is not done for MATN, as often
times a different approach to manipulating the matrix than by
direct reference is preferable for that case.
See WITH-FAST-MATREF
Allows efficient referencing to matrix elements.
ACCESSOR designates the name of the local macro that will allow
you to both read and set the matrix element at the given position
It will take either one or two arguments. If two, they are row and
column of the cell to dereference, and if one, it is the row-major
index of the element to dereference.
You must also designate the proper number of columns stored in the
matrix. This is done because often times when you will want to use
this macro, you’ll already know the number of columns anyway.
Retrieving it again would be wasteful.
You should use this whenever you need to reference elements in a loop or need to do more than one reference overall.
Allows efficient referencing of multiple matrices.
Each binding must be of the form that WITH-FAST-MATREF expects.
See WITH-FAST-MATREF
Computes a matrix multiplication.
If the other operand is a real, the matrix is multiplied with the real element-wise.
If the other operand is a matrix, they are multiplied as per matrix multiplication.
Note that the returned matrix may have different size than the input matrices as a result
of this. The two matrices must agree on the size as per matrix multiplication.
A special provision is made to allow for MAT4*VEC3, which acts as MAT4*(VEC4 X Y Z 1) and discarding the W component.
Computes the element-wise addition of the matrices or reals. Returns a fresh matrix.
Computes the element-wise subtraction of the matrices or reals. Returns a fresh matrix.
Computes an element-wise division of the matrix from a real. Returns a fresh matrix.
Compares matrices against each other or a real, returning T if they are element-wise equal by /=.
Computes the 1 norm of the matrix, namely the maximum of the sums of the columns.
Computes the 2 norm of the matrix, namely the square root of the sum of all squared elements.
Compares matrices against each other or a real, returning T if they are element-wise ordered by <.
Compares matrices against each other or a real, returning T if they are element-wise ordered by <=.
Compares matrices against each other or a real, returning T if they are element-wise equal by =.
Compares matrices against each other or a real, returning T if they are element-wise ordered by >.
Compares matrices against each other or a real, returning T if they are element-wise ordered by >=.
Computes the adjugate of the matrix.
For MAT2 MAT3 MAT4, inlined variants exist. For MATN, an algorithm based on the cofactors is used.
Applies the function to each element of the matrix and maps the result of it to a new matrix.
Applies the function to each element of the matrix and maps the result of it back into the matrix.
Returns the backing array used by the matrix.
This should be a SIMPLE-VECTOR with the elements of type FLOAT-TYPE.
See MARR2
See MARR3
See MARR4
See MARRN
Direct accessor to the backing array of the MAT2.
Direct accessor to the backing array of the MAT3o.
Direct accessor to the backing array of the MAT4.
Direct accessor to the backing array of the MATN.
Constructs a fitting matrix for the number of elements given.
This only works for square numbers of elements, as otherwise it is not possible
to guess what dimensions the matrix should have. In the case of a non-square
number, an error is signalled.
See MAT2
See MAT3
See MAT4
See MATN
Returns T if the given object is of type MAT.
See MAT2-P
See MAT3-P
See MAT4-P
See MATN-P
Constructs a MAT2 from the given elements.
ELEMENTS can be
NULL — The matrix is initialised with zeroes.
REAL — The matrix is initialised with this number.
SEQUENCE — The sequence is mapped into the matrix
and the rest are initialised to 0.
Returns T if the given object is of type MAT2.
Constructs a MAT3 from the given elements.
ELEMENTS can be
NULL — The matrix is initialised with zeroes.
REAL — The matrix is initialised with this number.
SEQUENCE — The sequence is mapped into the matrix
and the rest are initialised to 0.
Returns T if the given object is of type MAT3.
Constructs a MAT4 from the given elements.
ELEMENTS can be
NULL — The matrix is initialised with zeroes.
REAL — The matrix is initialised with this number.
SEQUENCE — The sequence is mapped into the matrix
and the rest are initialised to 0.
Returns T if the given object is of type MAT4.
Maps the VALs into the matrix.
The values will be mapped in row-major order.
Constructs a MATN of the requested size from the given elements.
ELEMENTS can be
NULL — The matrix is initialised with zeroes.
REAL — The matrix is initialised with this number.
SEQUENCE — The sequence is mapped into the matrix
and the rest are initialised to 0.
Note that if R and C are both...
2 - A MAT2 is constructed
3 - A MAT3 is constructed
4 - A MAT4 is constructed
instead of a MATN.
Returns T if the given object is of type MATN.
Returns the designated sub-matrix as a new matrix. Y1, X1 are the upper left corner, inclusive Y2, X2 are the lower right corner, exclusive
Returns the lowermost N rows as a new matrix.
Computes the cofactor matrix.
See MCOFACTOR
Computes the cofactor at the specified index of the matrix.
This is just the element at the position multiplied by the minor.
See MMINOR
Accesses the requested column as a vector of the appropriate size.
This only works for MAT2, MAT3, MAT4.
Returns the number of columns the matrix stores.
Creates a full copy of the matrix.
See MCOPY2
See MCOPY3
See MCOPY4
See MCOPYN
Creates a full copy of the MAT2.
Creates a full copy of the MAT3.
Creates a full copy of the MAT4.
Creates a full copy of the MATN.
Returns the element at the given cell in the matrix.
See MCREF2
See MCREF3
See MCREF4
See MCREFN
Returns the element at the given cell in the MAT2.
Returns the element at the given cell in the MAT3.
Returns the element at the given cell in the MAT4.
Returns the element at the given cell in the MATN.
Computes the determinant of the matrix.
For MAT2 MAT3 MAT4, inlined variants exist. For MATN, an algorithm based on LU factorisation is used.
Returns the diagonal values of the matrix as a list.
Computes an approximation of the eigenvalues of the matrix.
An approach based on QR factorisation is used. The number of iterations dictates
how many times the factorisation is repeated to make the result more accurate.
Usually something around 50 iterations should give somewhat accurate results, but
due to floating point limitations that may be off more significantly.
Returns the eigenvalues as a list.
Constructs a square identity matrix of the requested size.
Returns a 3D frustum projection view matrix.
See MPERSPECTIVE
Computes the infinity norm of the matrix, namely the maximum of the sums of the rows.
Computes the inverses of the matrix.
This is only possible if the determinant is non-zero.
For MAT2 MAT3 MAT4, inlined variants exist. For MATN, an algorithm based on the adjugate is used.
See MINV-AFFINE
Computes the inverses of the affine transformation matrix.
If your matrix is only composed of rotation and translation, this will be
much faster and more numerically stable than minv.
See MINV
Returns the element at the given index in the matrix.
Elements are stored in row-major format.
See MIREF2
See MIREF3
See MIREF4
See MIREFN
Returns the element at the given index in the MAT2.
Elements are stored in row-major format.
Returns the element at the given index in the MAT3.
Elements are stored in row-major format.
Returns the element at the given index in the MAT4.
Elements are stored in row-major format.
Returns the element at the given index in the MATN.
Elements are stored in row-major format.
Returns the leftmost N columns as a new matrix.
Returns a view translation matrix that should "look at" TARGET from EYE where UP is the up vector.
Computes an LU factorisation of the matrix.
An approach based on Crout is used with on-the-fly pivotisation if requested.
Returns the combined LU matrix, the permutation matrix, and the number of permutations that were done.
Computes the minor at the specified index of the matrix.
This basically calculates the determinant of the matrix with the row and column of the specified index excluded.
Returns a 3D orthographic projection view matrix.
Returns a 3D perspective projection view matrix.
FOVY – The field of view (how "zoomy" it is) ASPECT – The aspect ratio of the screen NEAR / FAR – The Z near and far clipping planes
See MFRUSTUM
Attempts to do a partial pivotisation.
Returns the pivotised matrix, the permutation matrix, and the number of permutations that were done.
Computes the QR factorisation of the matrix.
An approach based on givens rotations is used.
Returns the Q and R matrices, which are fresh.
Constructs a matrix of the requested size where each element is randomized.
MIN and MAX return the inclusive bounds of the numbers in the matrix.
Returns the rightmost N columns as a new matrix.
Returns a 3D rotation matrix for the given vector as a MAT4.
Accesses the requested row as a vector of the appropriate size.
This only works for MAT2, MAT3, MAT4.
Returns the number of rows the matrix stores.
Returns a 3D scaling matrix for the given vector as a MAT4.
Returns the topmost N rows as a new matrix.
Computes the trace of the matrix.
For MAT2 MAT3 MAT4, inlined variants exist. For MATN, a generic sum is used.
Returns a 3D translation matrix for the given vector as a MAT4.
Computes the transpose of the matrix.
For MAT2 MAT3 MAT4, inlined variants exist. For MATN, a generic swap is used.
Constructs a matrix of the requested size where each element is initialised to the requested element.
Compares matrices against each other or a real, returning T if they are element-wise equal by ~=.
See ~=
Computes a modifying matrix multiplication, but modifying the right-hand side.
See NM*
Computes a modifying matrix multiplication.
If the other operand is a real, the matrix is multiplied with the real element-wise.
If the other operand is a matrix, they are multiplied as per matrix multiplication.
Note that this only works for square matrix against square matrix, as otherwise a size
change would occur, which is not possible to do in a modifying variant. The two matrices
must agree on the size as per matrix multiplication.
If the other operand is a vector, the vector is modified.
A special provision is made to allow for MAT4*VEC3, which acts as MAT4*(VEC4 X Y Z 1)
and discarding the W component.
See N*M
Computes the element-wise addition of the matrices or reals. Returns the first matrix, modified.
Computes the element-wise subtraction of the matrices or reals. Returns the first matrix, modified.
Computes an element-wise division of the matrix from a real. Returns the modified, first matrix.
Modifies the matrix to look at TARGET from the EYE.
See MLOOKAT.
Rotates the given matrix around the vector by angle. Returns the modified matrix.
Scales the given matrix by the vector. Returns the modified matrix.
Modifies the matrix by swapping the Kth column with the Lth column.
Modifies the matrix by swapping the Kth row with the Lth row.
Translates the given matrix by the vector. Returns the modified matrix.
Writes the matrix in a certain format, by default a human-readable one.
FORMAT can be one of
:NICE - Prints it in a nice representation intended for humans.
:WOLFRAM - Prints it in the format for Wolfram Alpha, namely {{a,b..},..}
:ARRAY - Prints it as a common lisp 2D array.
If the STREAM is NIL, a string of the output is returned. Otherwise the matrix itself is returned.
The 2x2 matrix type.
structure-object
.
(simple-array 3d-vectors::float-type (4))
The 3x3 matrix type.
structure-object
.
(simple-array 3d-vectors::float-type (9))
The 4x4 matrix type.
structure-object
.
(simple-array 3d-vectors::float-type (16))
The NxM matrix type.
Supertype for all matrix types.
See MAT2
See MAT3
See MAT4
See MATN
The allowed divergence for ~= and m~= to succeed.
The maximum extent of a matrix dimension.
This is set to either the square root of ARRAY-DIMENSION-LIMIT or the square root of MOST-POSITIVE-FIXNUM, whichever is smaller.
Inner expansion to compute a proper matrix multiplication, which is non element-wise.
Macro for the handling of an operation for two matrices.
A B — Variables for the two matrices.
C — The function that combines an element from each matrix.
M2 M3 M4 — The aggregator for the respective matrix type that combines
the result of the combinator for each element of the matrix
into one.
MNMN — The form to use to calculate a MATN MATN op.
MNR — The form to use to calculate a MATN REAL op.
Inner expansion to compute an element-wise matrix division.
Inner expansion to compute a proper, modifying matrix multiplication on the right side.
Inner expansion to compute a proper, modifying matrix multiplication, which is non element-wise.
Inner expansion to compute an element-wise, modifying matrix division.
Proper array construction helper.
Emits a form that returns a useable array for a matrix.
Proper array constructor.
ELEMENTS can be
NULL — The initial element is set to 0.
REAL — The initial element is set to this.
SEQUENCE — The array is mapped into with this sequence
and the initial element is set to 0.
Shorthand macro to define a describe-object method.
Defines a matrix comparison function of NAME, using OP as the element-wise comparator.
COMB defines how the elements are combined together, usually by AND.
Defines a non-mutating matrix operation of NAME that delegates to NNAME for secondary calculations, and uses OP to combine elements.
If BODY is given, it is used for the 2MAT-case in place of a standard %2MAT-OP based approach.
Body will be called with two arguments, the A and B matrix of the combination.
A MATOP like this always returns a fresh matrix.
Defines a mutating matrix operation of NAME that uses OP to combine elements.
If BODY is given, it is used for the 2MAT-case in place of standard %2MAT-OP based approach.
Body will be called with two arguments, the A and B matrix of the combination.
A MATOP like this always returns the modified, first matrix.
Iterates over the diagonal of the matrix.
Binds the diagonal index to the variable of I and the element at that place to the variable of EL.
Iterates over the indexes of the matrix.
Binds the row-major index to the variable of I and the element at that place to the variable of EL.
Like LET, except ensuring that each value is of the appropriate float type.
Direct accessor to the number of columns in the MATN.
Direct constructor for the 2x2 matrix struct.
Direct constructor for the 3x3 matrix struct.
Direct constructor for the 4x4 matrix struct.
Direct constructor for the NxM matrix struct.
Returns a form that should construct a proper array for the given compile-time args.
Direct accessor to the number of rows in the MATN.
If the argument is a symbol, it resolves it to a function by FDEFINITION.
Otherwise it can only be a function in which case it is returned verbatim.
Maps the diagonal of the matrix to the function.
The function receives two arguments: the index in the diagonal, and the element at that position of the matrix.
Maps the matrix by index to the function.
The function receives two arguments: the row-major index in the matrix, and the element at that position of the matrix.
Returns a copy of the matrix with the columns swapped.
Returns a copy of the matrix with the rows swapped.
Does "approximate comparison" by testing whether the two numbers are within *EPS* from each other.
Jump to: | %
(
2
~
C D E F I M N P S W |
---|
Jump to: | %
(
2
~
C D E F I M N P S W |
---|
Jump to: | %
*
M S |
---|
Jump to: | %
*
M S |
---|
Jump to: | 3
D F I M O P S T |
---|
Jump to: | 3
D F I M O P S T |
---|