#include "MayDay.H"
#include "RealVect.H"
#include "IndexTM.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Go to the source code of this file.
Functions | |
Real | factorial (const int n) |
Calculates factorial for an integer. | |
Real | POW (const Real &a_x, const int &a_p) |
computes x^p | |
Real | nCk (const int n, const int k) |
Calculates the binomial coefficient, "n choose k". | |
template<int Dim> | |
Real | pfactorial (const IndexTM< int, Dim > p) |
Calculates factorials for a multinomial. | |
template<int Dim> | |
Real | pCk (const IndexTM< int, Dim > &p, const IndexTM< int, Dim > &k) |
Calculates the multinomial coefficient, "p choose k". | |
template<int Dim> | |
Real | power (const IndexTM< Real, Dim > &a_x, const IndexTM< int, Dim > &a_p) |
calculate x^p |
Real factorial | ( | const int | n | ) | [inline] |
Calculates factorial for an integer.
These helper functions calculate factorials, binomial coeff, etc. for multinomials.
References CH_assert.
Referenced by CutCellMoments< dim >::changeMomentCoordinates(), IndexedMoments< Dim, P >::divideByFactorial(), IndexedMoments< Dim, P >::multiplyByFactorial(), nCk(), and pfactorial().
computes x^p
References Abs().
Referenced by MinimalCCCM< dim >::computeRhs(), LSProblem< dim >::momentBounds(), LSProblem< dim >::monoMaxMin(), IndexedMoments< Dim, P >::setRegular(), and IndexedMoments< Dim, P >::shift().
Real nCk | ( | const int | n, | |
const int | k | |||
) | [inline] |
Calculates the binomial coefficient, "n choose k".
References CH_assert, and factorial().
Referenced by pCk().
Calculates factorials for a multinomial.
References CH_assert, and factorial().
Referenced by IndexedMoments< Dim, P >::divideByFactorial(), and IndexedMoments< Dim, P >::multiplyByFactorial().