3 #ifndef COMMON_UTILS_H_ 4 #define COMMON_UTILS_H_ 16 #define ARMA_DONT_USE_WRAPPER 18 #define ARMA_USE_LAPACK 32 #define WARN std::cerr 36 #define INFO std::cout 40 #define OUTPUT std::cout 43 #define EPSILON_1EMINUS16 0.00000000000000001 44 #define EPSILON 0.000001 45 #define EPSILON_1EMINUS12 1e-12 46 #define NUMBEROF_DECIMAL_PLACES 12 48 #define RAND_SEED_SPARSE 100 51 #define FMAT arma::fmat 53 #define FROWVEC arma::frowvec 54 #define ROWVEC arma::rowvec 55 #define FVEC arma::fvec 56 #define SP_FMAT arma::sp_fmat 57 #define SP_MAT arma::sp_mat 58 #define UVEC arma::uvec 59 #define IVEC arma::ivec 60 #define UWORD arma::uword 63 #define PRINTMATINFO(A) "::" #A "::" << (A).n_rows << "x" << (A).n_cols 65 #define PRINTMAT(A) PRINTMATINFO((A)) << endl << (A) 78 template <
typename FVT>
79 inline void fillVector(
const FVT value, std::vector<FVT> *a) {
80 for (
unsigned int ii = 0; ii < a->size(); ii++) {
85 #endif // COMMON_UTILS_H_
void tic()
start the timer. easy to call as tic(); some code; double t=toc();
void fillVector(const FVT value, std::vector< FVT > *a)
int random_sieve(const int)
std::vector< int > STDVEC
void absmat(const FMAT *X)