TMB Documentation  v1.9.11
Functions
convert.hpp File Reference

Convert vector/matrix-Types to double SEXP types. More...

Go to the source code of this file.

Functions

template<class Type >
matrix< Type > asMatrix (const vector< Type > &x, int nr, int nc)
 Vector <-> Matrix conversion (for row-major matrices)
 
template<class Type >
matrix< Type > asMatrix (SEXP x)
 Construct C++-matrix from SEXP object.
 
template<class Type >
SEXP asSEXP (const matrix< Type > &a)
 Convert TMB matrix, vector, scalar or int to R style.
 
template<class Type >
SEXP asSEXP (Eigen::SparseMatrix< Type > x)
 
template<class Type >
vector< Type > asVector (SEXP x)
 Construct c++-vector from SEXP object.
 

Detailed Description

Convert vector/matrix-Types to double SEXP types.

Definition in file convert.hpp.

Function Documentation

§ asSEXP()

template<class Type >
SEXP asSEXP ( Eigen::SparseMatrix< Type >  x)

Create R-triplet sparse matrix from Eigen sparse matrix

Definition at line 159 of file convert.hpp.

License: GPL v2