FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::MetaMath::Factorial< n_, m_ > Struct Template Reference

Factorial template meta-program. More...

#include <meta_math.hpp>

Static Public Attributes

static constexpr int value = n_ * Factorial<n_ - 1, m_>::value
 value of the factorial More...
 

Detailed Description

template<int n_, int m_ = 0>
struct FEAT::MetaMath::Factorial< n_, m_ >

Factorial template meta-program.

This meta-program calculates the coefficient

\[ f(n,m) := \prod_{k=m}^n k \]

at compile-time. The factorial n! is given by f(n,0).

Author
Peter Zajac

Definition at line 30 of file meta_math.hpp.

Member Data Documentation

◆ value

template<int n_, int m_ = 0>
constexpr int FEAT::MetaMath::Factorial< n_, m_ >::value = n_ * Factorial<n_ - 1, m_>::value
staticconstexpr

value of the factorial

Definition at line 38 of file meta_math.hpp.


The documentation for this struct was generated from the following file: