Factorial function.
More...
#include <Math.h>
Inherits pcl::FactorialCache.
|
T | Ln (int n) const noexcept |
|
T | operator() (int n) const noexcept |
|
template<typename T>
class pcl::Fact< T >
We use a static lookup table to speed up for n <= 127.
Example of use:
double factorialOfEight = Fact<double>()( 8 );
The implementation of this class is thread-safe.
- Deprecated:
- This class is deprecated and subject to removal in a future version of PCL. For newly produced code, use the pcl::Factorial() and pcl::LnFactorial() functions instead.
Definition at line 760 of file Math.h.
◆ Ln()
Returns the natural logarithm of the factorial of n ≥ 0. For n <= 127 computes the natural logarithm of the factorial function directly. For n > 127 computes a series approximation, so that the function won't overflow even for very large arguments.
Definition at line 782 of file Math.h.
◆ operator()()
Returns the factorial of n ≥ 0.
Definition at line 765 of file Math.h.
The documentation for this class was generated from the following file: