ADMB Documentation
-a65f1c97
|
functions useful for simulation model in admb More...
#include "qfclib.h"
Go to the source code of this file.
Namespaces | |
qfclib | |
Functions | |
bool | doubleEqual (double nVal1, double nVal2, int nPrecision) |
determine if two double values are equal within some precision More... | |
dmatrix | findValFromFile (adstring filename, adstring varName, int numVals) |
find the number of values(numVals) for one specific variable(varName) from an admb output file More... | |
dvector | matrix2vector (const dmatrix &input, int byrow=1) |
convert the matrix as a vector eithter by row=1(default) or by column=0, More... | |
dvar_vector | matrix2vector (const dvar_matrix &input, int byrow=1) |
convert the matrix as a vector eithter by row=1(default) or by column=0, overloading function More... | |
df1b2vector | matrix2vector (const df1b2matrix &input, int byrow=1) |
convert the matrix as a vector eithter by row=1(default) or by column=0, overloading function More... | |
int | numRows4VarFromFile (adstring filename, adstring varName) |
get how many rows for one specific variable(varName) in admb output file(filename) More... | |
double | rbeta (double alpha, double beta, random_number_generator &rng) |
generate random beta(alpha, beta) number, More... | |
dvector | rdirichlet (const dvector &shape, random_number_generator &rng) |
generate random dirichlet number More... | |
double | qfclib::rgamma (double alpha, random_number_generator &rng) |
generate random gamma number, pseudo code see http://en.wikipedia.org/wiki/Gamma_distribution , Gamma(alpha, belta)=x^(alpha-1)*belta^alpha*exp(-belta*x)/gamma(alpha) More... | |
double | rgamma (double alpha, random_number_generator &rng) |
Copyright (c) 2016 ADMB Foundation. More... | |
double | rgamma (double alpha, double beta, random_number_generator &rng) |
generate random gamma number, mean is alpha/belta, variance is alpha/(belta^2) More... | |
double | rlnorm (double mu, double sigma, random_number_generator &rng) |
generate one random lognormal number LN(mu,sigma) More... | |
double | rnorm (double mu, double sigma, random_number_generator &rng) |
generate one random normal number N(mu,sigma) More... | |
double | runif (double low, double upper, random_number_generator &rng) |
generate one random uniform from (low,upper) More... | |
ivector | sample (const dvector &source, int nSample, int withReplace, const random_number_generator &rng) |
generate a random sample index(size is nSample) based on the input samples(source) with or without replacement More... | |
dvector | unique (const dvector &in) |
find the unique values from input vector and only return the unique (by remove the duplicate) values in ascending order More... | |
dmatrix | vector2matrix (dvector &input, int nrow, int ncol, int byrow=1) |
convert the Vector as a Matrix eithter by row=1(default) or by column=0, More... | |
df1b2matrix | vector2matrix (df1b2vector &input, int nrow, int ncol, int byrow=1) |
convert the Vector as a Matrix eithter by row=1(default) or by column=0, overloading function More... | |
dvar_matrix | vector2matrix (const dvar_vector &input, int nrow, int ncol, int byrow=1) |
convert the Vector as a Matrix eithter by row=1(default) or by column=0, overloading function More... | |
functions useful for simulation model in admb
Following user defined functions are more useful for doing simulation model in admb, the easy way to use these functions is with your tpl file under the GLOBALS_SECTION , add a line on top as #include "qfclib.h", there is a testfunction.tpl file within this folder show how to use these functions.
================ brief list for usage ============================
Definition in file qfc_sim.cpp.
Generated on Wed Sep 7 2022 00:01:32 for ADMB Documentation by 1.8.5 |