mrgsolve
Macros | Functions
mrgsolve.cpp File Reference
#include "RcppInclude.h"
#include "mrgsolve.h"
#include "dataobject.h"
#include <vector>
#include <string>
#include "boost/tokenizer.hpp"

Macros

#define EXPAND_OBSERVATIONS_FUNC
 

Functions

double digits (const double &a, const double &b)
 
int find_position (const Rcpp::CharacterVector &what, const Rcpp::CharacterVector &table)
 
void negative_istate (int istate, int maxsteps, double rtol, double atol)
 
arma::mat MVGAUSS (Rcpp::NumericMatrix &OMEGA_, int n)
 
arma::mat MVGAUSS (arma::mat &OMEGA, int n)
 
void dcorr (Rcpp::NumericMatrix &x)
 
Rcpp::NumericMatrix SUPERMATRIX (const Rcpp::List &a, bool keep_names)
 
Rcpp::List get_tokens (const Rcpp::CharacterVector &code)
 
void from_to (const Rcpp::CharacterVector &a, const Rcpp::CharacterVector &b, std::vector< int > &ai, std::vector< int > &bi)
 
Rcpp::NumericMatrix EXPAND_EVENTS (const Rcpp::IntegerVector &idcol_, const Rcpp::NumericMatrix &events, const Rcpp::NumericVector &id)
 
Rcpp::List EXPAND_OBSERVATIONS (const Rcpp::NumericMatrix &data, const Rcpp::NumericVector &times, const Rcpp::IntegerVector &to_copy, const Rcpp::IntegerVector &next_pos)
 

Macro Definition Documentation

◆ EXPAND_OBSERVATIONS_FUNC

#define EXPAND_OBSERVATIONS_FUNC

Function Documentation

◆ dcorr()

void dcorr ( Rcpp::NumericMatrix &  x)

◆ digits()

double digits ( const double &  a,
const double &  b 
)

Limit a number to a specific number of significant digits.

Parameters
athe number to limit
bthe number of digits

◆ EXPAND_EVENTS()

Rcpp::NumericMatrix EXPAND_EVENTS ( const Rcpp::IntegerVector &  idcol_,
const Rcpp::NumericMatrix &  events,
const Rcpp::NumericVector &  id 
)

◆ EXPAND_OBSERVATIONS()

Rcpp::List EXPAND_OBSERVATIONS ( const Rcpp::NumericMatrix &  data,
const Rcpp::NumericVector &  times,
const Rcpp::IntegerVector &  to_copy,
const Rcpp::IntegerVector &  next_pos 
)

◆ find_position()

int find_position ( const Rcpp::CharacterVector &  what,
const Rcpp::CharacterVector &  table 
)

Find the position of a string in a character vector.

Parameters
whatthe string to look for
tablewhere to look for the string
Returns
the position of the string with 0-based indexing if the string is found; -1 otherwise

◆ from_to()

void from_to ( const Rcpp::CharacterVector &  a,
const Rcpp::CharacterVector &  b,
std::vector< int > &  ai,
std::vector< int > &  bi 
)

◆ get_tokens()

Rcpp::List get_tokens ( const Rcpp::CharacterVector &  code)

◆ MVGAUSS() [1/2]

arma::mat MVGAUSS ( arma::mat &  OMEGA,
int  n 
)

◆ MVGAUSS() [2/2]

arma::mat MVGAUSS ( Rcpp::NumericMatrix &  OMEGA_,
int  n 
)

Simulate from a multivariate normal distribution with mean 0.

Parameters
OMEGA_the covariance matrix
nthe number of variates to simulate
Returns
matrix of simulated variates

◆ negative_istate()

void negative_istate ( int  istate,
int  maxsteps,
double  rtol,
double  atol 
)

◆ SUPERMATRIX()

Rcpp::NumericMatrix SUPERMATRIX ( const Rcpp::List &  a,
bool  keep_names 
)