TMB Documentation
v1.9.11
|
Special matrix functions for which derivatives are implemented. More...
Functions | |
template<class Type > | |
matrix< Type > | atomic::absm (matrix< Type > x) |
Matrix absolute value. More... | |
template<class Type > | |
matrix< Type > | atomic::expm (matrix< Type > x) |
Matrix exponential. More... | |
template<class Type > | |
vector< std::complex< Type > > | atomic::fft (vector< std::complex< Type > > xc, bool inverse=false) |
FFT (unscaled) More... | |
template<class Type > | |
Type | atomic::logdet (matrix< Type > x) |
Log-determinant of positive definite matrix. | |
template<class Type > | |
matrix< Type > | atomic::matinv (matrix< Type > x) |
Matrix inverse. More... | |
template<class Type > | |
matrix< Type > | atomic::matinvpd (matrix< Type > x, Type &logdet) |
Matrix inverse and determinant. More... | |
template<class Type > | |
matrix< Type > | atomic::matmul (matrix< Type > x, matrix< Type > y) |
Matrix multiply. More... | |
template<class Type > | |
matrix< Type > | atomic::sqrtm (matrix< Type > x) |
Matrix square root. More... | |
Special matrix functions for which derivatives are implemented.
These matrix operations are designed to work with automatic differentiation for large dense matrices.
Matrix absolute value.
Calculate the absolute value matrix of a dense symmetric matrix (represented by its lower triangle). The result will be symmetric positive semi-definite. The matrix abs is defined as absm(x)=sqrtm(matmul(x,x))
, but it is more numerically robust especially for singular x
.
Matrix exponential.
Calculate the matrix exponential of a dense matrix.
Definition at line 366 of file expm.hpp.
Referenced by atomic::absm().
vector<std::complex<Type> > atomic::fft | ( | vector< std::complex< Type > > | xc, |
bool | inverse = false |
||
) |
FFT (unscaled)
xc | Complex vector to be transformed |
inverse | Apply the (unscaled) inverse transform? This interface is identical to 'stats::fft' so does not perform inverse scaling. |
EIGEN_FFTW_DEFAULT
. Matrix inverse.
Invert a matrix by LU-decomposition.
For small matrices use
Definition at line 611 of file atomic_math.hpp.
Referenced by newton::jacobian_sparse_plus_lowrank_t< dummy >::llt_solve().
Matrix inverse and determinant.
Calculate matrix inverse and log-determinant of a positive definite matrix.
Definition at line 624 of file atomic_math.hpp.
Referenced by density::MVNORM_t< scalartype >::cov().
Matrix multiply.
Matrix multiplication of large dense matrices.
For small matrices use
Definition at line 583 of file atomic_math.hpp.
Referenced by newton::jacobian_sparse_plus_lowrank_t< dummy >::llt_solve().