Liking cljdoc? Tell your friends :D

mikera.vectorz.matrix

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.
raw docstring

*clj

(* 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
raw docstring

affine-transform?clj

(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)
raw docstring

as-vectorclj

(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)
raw docstring

cloneclj

(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.
raw docstring

composeclj

(compose a b)

Composes a transform with another transform

Composes a transform with another transform
raw docstring

compose!clj

(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.
raw docstring

constant-transformclj

(constant-transform v & {:keys [input-dimensions]})

Converts a vector to a constant transform

Converts a vector to a constant transform
raw docstring

determinantclj

(determinant m)

Gets the determinant of a (square) matrix

Gets the determinant of a (square) matrix
raw docstring

diagonal-matrixclj

(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
raw docstring

fully-mutable?clj

(fully-mutable? m)

Returns true if the matrix is fully mutable

Returns true if the matrix is fully mutable
raw docstring

getclj

(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
raw docstring

get-columnclj

(get-column m row)

Gets a column of the matrix as a vector

Gets a column of the matrix as a vector
raw docstring

get-rowclj

(get-row m row)

Gets a row of the matrix as a vector

Gets a row of the matrix as a vector
raw docstring

identity-matrixclj

(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.
raw docstring

identity?clj

(identity? m)

Returns true if the matrix is an identity matrix

Returns true if the matrix is an identity matrix
raw docstring

input-dimensionsclj

(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
raw docstring

inverseclj

(inverse m)

Gets the inverse of a square matrix as a new matrix.

Gets the inverse of a square matrix as a new matrix.
raw docstring

matrixclj

(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
raw docstring

matrix?clj

(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)
raw docstring

new-matrixclj

(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
raw docstring

output-dimensionsclj

(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
raw docstring

scalar-matrixclj

(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)
raw docstring

scaleclj

(scale m factor)

Scales a matrix by a scalar factor

Scales a matrix by a scalar factor
raw docstring

scale-matrixclj

(scale-matrix scale-factors)
(scale-matrix dimensions factor)

Creates a diagonal scaling matrix

Creates a diagonal scaling matrix
raw docstring

setclj

(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)
raw docstring

square?clj

(square? m)

Returns true if the matrix is a square matrix

Returns true if the matrix is a square matrix
raw docstring

to-transformclj

(to-transform a)

Coerces a matrix or transform to an ATransform instance

Coerces a matrix or transform to an ATransform instance
raw docstring

transformclj

(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
raw docstring

transform!clj

(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
raw docstring

transform-normalclj

(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
raw docstring

transform?clj

(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)
raw docstring

transposeclj

(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
raw docstring

transpose!clj

(transpose! m)

Transposes a matrix in place, if possible

Transposes a matrix in place, if possible
raw docstring

x-axis-rotation-matrixclj

(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
raw docstring

y-axis-rotation-matrixclj

(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
raw docstring

z-axis-rotation-matrixclj

(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
raw docstring

zero?clj

(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)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close