Clojure API for directly accessing Vectorz matrix functions.
In most cases these are relatively lightweight wrappers over equivalent functions in Vectorz, but specialised with type hints for handling Vectorz matrices for performance purposes.
These are generally equivalent to similar functions in clojure.core.matrix API. If performance is less of a concern, consider using the clojure.core.matrix API directly, which offer more functionality and work with a much broader range of array shapes and argument types.
Clojure API for directly accessing Vectorz matrix functions. In most cases these are relatively lightweight wrappers over equivalent functions in Vectorz, but specialised with type hints for handling Vectorz matrices for performance purposes. These are generally equivalent to similar functions in clojure.core.matrix API. If performance is less of a concern, consider using the clojure.core.matrix API directly, which offer more functionality and work with a much broader range of array shapes and argument types.
(* m a)
Applies a matrix to a vector or matrix, returning a new vector or matrix. If applied to a vector, the vector is transformed. If applied to a matrix, the two matrices are composed
Applies a matrix to a vector or matrix, returning a new vector or matrix. If applied to a vector, the vector is transformed. If applied to a matrix, the two matrices are composed
(affine-transform? m)
Returns true if m is a transform (i.e. an instance of mikera.transformz.AAffineTransform)
Returns true if m is a transform (i.e. an instance of mikera.transformz.AAffineTransform)
(as-vector m)
Returns a vector view over all elements of a matrix (in row major order)
Returns a vector view over all elements of a matrix (in row major order)
(clone v)
Creates a (mutable) deep clone of a matrix. May not be exactly the same class as the original matrix.
Creates a (mutable) deep clone of a matrix. May not be exactly the same class as the original matrix.
(compose a b)
Composes a transform with another transform
Composes a transform with another transform
(compose! a b)
Composes a transform with another transform (in-place). Second transform should be square.
Composes a transform with another transform (in-place). Second transform should be square.
(constant-transform v & {:keys [input-dimensions]})
Converts a vector to a constant transform
Converts a vector to a constant transform
(determinant m)
Gets the determinant of a (square) matrix
Gets the determinant of a (square) matrix
(diagonal-matrix diagonal-values)
Creates a diagonal matrix, using the sequence of diagonal values provided
Creates a diagonal matrix, using the sequence of diagonal values provided
(fully-mutable? m)
Returns true if the matrix is fully mutable
Returns true if the matrix is fully mutable
(get m row column)
Returns the component of a matrix at a specific (row,column) position
Returns the component of a matrix at a specific (row,column) position
(get-column m row)
Gets a column of the matrix as a vector
Gets a column of the matrix as a vector
(get-row m row)
Gets a row of the matrix as a vector
Gets a row of the matrix as a vector
(identity-matrix dimensions)
Returns an immutable identity matrix for the given number of dimensions.
Returns an immutable identity matrix for the given number of dimensions.
(identity? m)
Returns true if the matrix is an identity matrix
Returns true if the matrix is an identity matrix
(input-dimensions m)
Gets the number of input dimensions (columns) of a matrix or other transform
Gets the number of input dimensions (columns) of a matrix or other transform
(inverse m)
Gets the inverse of a square matrix as a new matrix.
Gets the inverse of a square matrix as a new matrix.
(matrix rows)
Creates a new, mutable matrix using the specified data, which should be a sequence of row vectors
Creates a new, mutable matrix using the specified data, which should be a sequence of row vectors
(matrix? m)
Returns true if m is a Vectorz matrix (i.e. an instance of mikera.matrixx.AMatrix)
Returns true if m is a Vectorz matrix (i.e. an instance of mikera.matrixx.AMatrix)
(new-matrix row-count column-count)
Creates a new, mutable, zero-filled matrix with the given number of rows and columns
Creates a new, mutable, zero-filled matrix with the given number of rows and columns
(output-dimensions m)
Gets the number of output dimensions (rows) of a matrix or other transform
Gets the number of output dimensions (rows) of a matrix or other transform
(scalar-matrix dimensions factor)
Creates a diagonal scalar matrix (multiplies all components by same factor)
Creates a diagonal scalar matrix (multiplies all components by same factor)
(scale m factor)
Scales a matrix by a scalar factor
Scales a matrix by a scalar factor
(scale-matrix scale-factors)
(scale-matrix dimensions factor)
Creates a diagonal scaling matrix
Creates a diagonal scaling matrix
(set m row column value)
Sets the component of a matrix at a (row,column) position (mutates in place)
Sets the component of a matrix at a (row,column) position (mutates in place)
(square? m)
Returns true if the matrix is a square matrix
Returns true if the matrix is a square matrix
(to-transform a)
Coerces a matrix or transform to an ATransform instance
Coerces a matrix or transform to an ATransform instance
(transform m a)
Applies a matrix transform to a vector, returning a new vector
Applies a matrix transform to a vector, returning a new vector
(transform! m a)
Applies a matrix transform to a vector, modifying the vector in place
Applies a matrix transform to a vector, modifying the vector in place
(transform-normal m src dest)
Applies a an affine transform to a normal vector, storing the result in dest
Applies a an affine transform to a normal vector, storing the result in dest
(transform? m)
Returns true if m is a transform (i.e. an instance of mikera.transformz.ATransform)
Returns true if m is a transform (i.e. an instance of mikera.transformz.ATransform)
(transpose m)
Gets the transpose of a matrix as a transposed reference to the original matrix
Gets the transpose of a matrix as a transposed reference to the original matrix
(transpose! m)
Transposes a matrix in place, if possible
Transposes a matrix in place, if possible
(x-axis-rotation-matrix angle)
Creates a rotation matrix with the given number of radians around the x axis
Creates a rotation matrix with the given number of radians around the x axis
(y-axis-rotation-matrix angle)
Creates a rotation matrix with the given number of radians around the y axis
Creates a rotation matrix with the given number of radians around the y axis
(z-axis-rotation-matrix angle)
Creates a rotation matrix with the given number of radians around the z axis
Creates a rotation matrix with the given number of radians around the z axis
(zero? m)
Returns true if the matrix is a zero-filled matrix (i.e. maps every vector to zero)
Returns true if the matrix is a zero-filled matrix (i.e. maps every vector to zero)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close