13 #define MATHLIB_STANDALONE 17 #include <RcppArmadillo.h> 25 using cx_dbl = std::complex<double>;
26 using cx_func = std::function<arma::cx_mat(arma::cx_vec theta)>;
27 using matlist = std::vector<arma::mat>;
31 arma::mat expit(arma::mat x);
32 arma::cx_mat expit(arma::cx_mat x);
33 arma::vec softmax(arma::vec u);
34 arma::mat softmax(arma::mat lp,
bool ref,
bool log);
40 arma::mat expit(arma::mat x);
41 arma::cx_mat expit(arma::cx_mat x);
47 IID(): iid(arma::zeros(1, 1)), vcov(arma::zeros(1, 1)) {}
48 IID(arma::mat score, arma::mat v): iid(score*v), vcov(v) {}
51 IID logistic_iid(
const arma::vec &y,
56 IID linear_iid(
const arma::vec &y,