TMB Documentation
v1.9.11
|
Utility functions for TMB (automatically included) More...
Classes | |
struct | array |
Array class used by TMB. More... | |
struct | Concat |
Serialized representation of objects of different types. More... | |
struct | interpol2D |
Get a smooth representation of a data matrix. More... | |
struct | interpol2D_config |
Configuration for Interpol2D More... | |
struct | matexp |
Matrix exponential: matrix of arbitrary dimension. More... | |
struct | matexp< scalartype, 2 > |
Matrix exponential: 2x2 case which can be handled efficiently. More... | |
struct | matrix |
Matrix class used by TMB. More... | |
class | order |
Taped sorting of a vector. More... | |
class | splinefun |
Spline Interpolation. More... | |
struct | vector |
Vector class used by TMB. More... | |
Functions | |
template<class Type > | |
Eigen::SparseMatrix< Type > | asSparseMatrix (SEXP M) |
template<class Type > | |
Eigen::SparseMatrix< Type > | asSparseMatrix (matrix< Type > x) |
Create sparse matrix from dense matrix. More... | |
template<class Type > | |
Eigen::SparseVector< Type > | asSparseVector (vector< Type > x) |
Create sparse vector from dense vector. More... | |
template<class... Ts> | |
Concat< Ts... > | concat (Ts &... args) |
Serialized representation of objects of different types. More... | |
template<class Type > | |
matrix< Type > | discrLyap (matrix< Type > A_) |
template<class Type > | |
matrix< Type > | invertSparseMatrix (Eigen::SparseMatrix< Type > A) |
template<class Type > | |
bool | isStructuralZero (Type x) |
Test if a scalar is a structural zero. More... | |
template<class scalartype , int n1, int n2, int n3, int n4> | |
Matrix< scalartype, n1 *n3, n2 *n4 > | kronecker (Matrix< scalartype, n1, n2 > x, Matrix< scalartype, n3, n4 > y) |
Kronecker product of two matrices. | |
template<class scalartype > | |
matrix< scalartype > | kronecker (matrix< scalartype > x, matrix< scalartype > y) |
Kronecker product of two matrices. | |
template<class Type > | |
Eigen::SparseMatrix< Type > | kronecker (Eigen::SparseMatrix< Type > x, Eigen::SparseMatrix< Type > y) |
Utility functions for TMB (automatically included)
Contains basic data types such as vectors, matrices and arrays. Included automatically so you should NOT include it via
Eigen::SparseMatrix<Type> tmbutils::asSparseMatrix | ( | SEXP | M | ) |
Eigen::SparseMatrix<Type> tmbutils::asSparseMatrix | ( | matrix< Type > | x | ) |
Create sparse matrix from dense matrix.
This function converts a dense matrix to a sparse matrix based on its numerical values.
isStructuralZero()
ensuring that entries which might become non-zero for certain parameter settings will not be regarded as zeros. Eigen::SparseVector<Type> tmbutils::asSparseVector | ( | vector< Type > | x | ) |
Create sparse vector from dense vector.
This function converts a dense vector to a sparse vector based on its numerical values.
isStructuralZero()
ensuring that entries which might become non-zero for certain parameter settings will not be regarded as zeros. Concat<Ts...> tmbutils::concat | ( | Ts &... | args | ) |
Serialized representation of objects of different types.
This function provides an interface between a parameter list and its serialized (vector) representation. In R, this would correspond to 'unlist()/relist()'.
Example:
Definition at line 95 of file concat.hpp.
matrix<Type> tmbutils::invertSparseMatrix | ( | Eigen::SparseMatrix< Type > | A | ) |
bool tmbutils::isStructuralZero | ( | Type | x | ) |
Test if a scalar is a structural zero.
A structural zero is a scalar taking the value zero for all configurations of the model parameters. If the return value is true
the input is guarantied to be a structural zero.
false
. For instance complex structural zeros such as \(1-sin(x)^2-cos(x)^2\) won't be detected. Definition at line 39 of file spmat.hpp.
Referenced by asSparseMatrix(), and asSparseVector().