|
TMB Documentation
v1.9.11
|
Templates to get convenient R-like syntax. More...
Go to the source code of this file.
Functions | |
| template<class Type > | |
| vector< Type > | diff (vector< Type > x) |
| template<class Type > | |
| Type | invlogit (Type x) |
| template<class Type > | |
| Type | logit (Type x) |
| template<class Type > | |
| Type | logspace_add (Type logx, Type logy) |
| Addition in log-space. More... | |
| template<class Type > | |
| Type | logspace_sub (Type logx, Type logy) |
| Subtraction in log-space. More... | |
| template<class Type > | |
| Type | matern (Type u, Type phi, Type kappa) |
| template<class Type > | |
| Type | max (const vector< Type > &x) |
| template<class Type > | |
| Type | min (const vector< Type > &x) |
| template<class Type > | |
| vector< Type > | operator* (matrix< Type > A, vector< Type > x) |
| template<class Type > | |
| vector< Type > | operator* (Eigen::SparseMatrix< Type > A, vector< Type > x) |
| template<class Type > | |
| Type | pnorm_approx (Type x) |
| Approximate normal cumulative distribution function, similar to R's pnorm (one-argument case only). More... | |
| template<class Type > | |
| Type | qnorm_approx (Type x) |
| Approximate inverse normal cumulative distribution function, similar to R's qnorm (one-argument case only). More... | |
| template<class Type > | |
| vector< vector< Type > > | split (vector< Type > x, vector< int > fac) |
| Similar to R's split function: split(x,fac) devides x into groups defined by fac . More... | |
| template<class Type > | |
| Type | squeeze (Type u) |
| template<template< class > class Vector, class Type > | |
| Type | sum (Vector< Type > x) |
Templates to get convenient R-like syntax.
Definition in file convenience.hpp.
Diff of vector
Difference of vector elements just like diff in R, but only for vectors.
Definition at line 92 of file convenience.hpp.
| Type invlogit | ( | Type | x | ) |
Inverse Logit
Calculates the inverse of the logit transformation; the same as plogis in base or inv.logit in the boot package in R.
Definition at line 114 of file convenience.hpp.
| Type logit | ( | Type | x | ) |
Logit
Calculates the logit transformation; the same as qlogis in base or logit in the boot package in R.
Definition at line 104 of file convenience.hpp.
| Type max | ( | const vector< Type > & | x | ) |
Taped maximum of vector
Definition at line 145 of file convenience.hpp.
Referenced by TMBad::autopar::max_tree_depth().
| Type min | ( | const vector< Type > & | x | ) |
Taped minimum of vector
Definition at line 156 of file convenience.hpp.
Referenced by sparse_matrix_exponential::expm_series< T >::operator()().
Matrix * vector
Simplifies syntax in that .matrix() can be avoided. Recall: TMB type vector is of Eigen type Array.
Definition at line 42 of file convenience.hpp.
Referenced by TMBad::ReverseArgs< Type >::dy_segment(), and TMBad::forceContiguous().
SparseMatrix * vector
Definition at line 48 of file convenience.hpp.
| Type pnorm_approx | ( | Type | x | ) |
Approximate normal cumulative distribution function, similar to R's pnorm (one-argument case only).
Has been replaced by more accurate version based on Rmath library.
Definition at line 58 of file convenience.hpp.
| Type qnorm_approx | ( | Type | x | ) |
Approximate inverse normal cumulative distribution function, similar to R's qnorm (one-argument case only).
Has been replaced by more accurate version based on Rmath library.
Definition at line 72 of file convenience.hpp.
Similar to R's split function: split(x,fac) devides x into groups defined by fac .
Returns a "vector of vectors".
Definition at line 13 of file convenience.hpp.
| Type squeeze | ( | Type | u | ) |
'squeeze' transform : [0,1] -> (0,1) to machine tolerance
Definition at line 137 of file convenience.hpp.
| Type sum | ( | Vector< Type > | x | ) |
Sum of vector, matrix or array
Definition at line 33 of file convenience.hpp.
Referenced by TMBad::accumulation_tree_split(), sparse_matrix_exponential::expm_generator< T >::operator()(), and density::VECSCALE_t< distribution >::operator()().