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
sourceraw 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)
sourceraw 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)
sourceraw 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.
sourceraw docstring

composeclj

(compose a b)

Composes a transform with another transform

Composes a transform with another transform
sourceraw 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.
sourceraw docstring

constant-transformclj

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

Converts a vector to a constant transform

Converts a vector to a constant transform
sourceraw docstring

determinantclj

(determinant m)

Gets the determinant of a (square) matrix

Gets the determinant of a (square) matrix
sourceraw 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
sourceraw docstring

fully-mutable?clj

(fully-mutable? m)

Returns true if the matrix is fully mutable

Returns true if the matrix is fully mutable
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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.
sourceraw docstring

identity?clj

(identity? m)

Returns true if the matrix is an identity matrix

Returns true if the matrix is an identity matrix
sourceraw 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
sourceraw 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.
sourceraw 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
sourceraw 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)
sourceraw 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
sourceraw 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
sourceraw 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)
sourceraw docstring

scaleclj

(scale m factor)

Scales a matrix by a scalar factor

Scales a matrix by a scalar factor
sourceraw docstring

scale-matrixclj

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

Creates a diagonal scaling matrix

Creates a diagonal scaling matrix
sourceraw 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)
sourceraw docstring

square?clj

(square? m)

Returns true if the matrix is a square matrix

Returns true if the matrix is a square matrix
sourceraw docstring

to-transformclj

(to-transform a)

Coerces a matrix or transform to an ATransform instance

Coerces a matrix or transform to an ATransform instance
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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)
sourceraw 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
sourceraw docstring

transpose!clj

(transpose! m)

Transposes a matrix in place, if possible

Transposes a matrix in place, if possible
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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)
sourceraw docstring

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

× close