/* tabulate logcombi(k,.) */ float *makelogcombi_k(int k,int nmax) { float *l; int n; l = (float *)malloc((nmax+1)*sizeof(float)); for (n=0;n<=nmax;n++) l[n]=logcombi(k,n); return(l); }
/* tabulate logcombi(.,n) */ float * makelogcombi_n(int n) { float *l; int k; l = (float *)malloc((n+1)*sizeof(float)); for (k=0;k<=n;k++) l[k]=logcombi(k,n); return(l); }
/// tabulate logcombi(k,.) static void makelogcombi_k(int k,int nmax, std::vector<float> & l) { l.resize(nmax+1); for (int n = 0; n <= nmax; n++) l[n] = logcombi(k,n); }
/// tabulate logcombi(.,n) static void makelogcombi_n(int n, std::vector<float> & l) { l.resize(n+1); for (int k = 0; k <= n; k++) l[k] = logcombi(k,n); }
static void makelogcombi_k(size_t k, size_t nmax, std::vector<Type> & l) { l.resize(nmax+1); for (size_t n = 0; n <= nmax; n++) l[n] = static_cast<Type>(logcombi(k,n)); }
static void makelogcombi_n(size_t n, std::vector<Type> & l) { l.resize(n+1); for (size_t k = 0; k <= n; k++) l[k] = static_cast<Type>( logcombi(k,n) ); }