17 #include "NamespaceHeader.H" 29 for (
int i = 2; i <= n; nfact*= i, i++);
36 for(
int iexp = 0; iexp <
Abs(a_p); iexp++)
55 for (
int i = n-k+1; i <= n; nck*= i, i++);
64 for(
int idir = 0; idir < Dim; idir++)
79 for(
int idir = 0; idir < Dim; idir++)
81 pfact *=
nCk(p[idir],k[idir]);
92 for(
int idir = 0; idir < Dim; idir++)
113 #include "NamespaceFooter.H" #define CH_assert(cond)
Definition: CHArray.H:37
Real pfactorial(const IndexTM< int, Dim > p)
Calculates factorials for a multinomial.
Definition: Factorial.H:61
Real POW(const Real &a_x, const int &a_p)
computes x^p
Definition: Factorial.H:33
Real nCk(const int n, const int k)
Calculates the binomial coefficient, "n choose k".
Definition: Factorial.H:51
Real pCk(const IndexTM< int, Dim > &p, const IndexTM< int, Dim > &k)
Calculates the multinomial coefficient, "p choose k".
Definition: Factorial.H:74
double Real
Definition: REAL.H:33
T Abs(const T &a_a)
Definition: Misc.H:53
Real power(const IndexTM< Real, Dim > &a_x, const IndexTM< int, Dim > &a_p)
calculate x^p
Definition: Factorial.H:89
Real factorial(const int n)
Calculates factorial for an integer.
Definition: Factorial.H:25
constexpr int ipow(int M)
Definition: Misc.H:80