OpenWalnut  1.5.0dev
Public Types | List of all members
WBinom< n, k > Struct Template Reference

Implements compile-time calculation of binomial coefficients. More...

#include <WCompileTimeFunctions.h>

Public Types

enum  { value = WBinom< n - 1, k - 1 >::value + WBinom< n - 1, k >::value }
 Using an enum here instead of a static constant. More...
 

Detailed Description

template<std::size_t n, std::size_t k>
struct WBinom< n, k >

Implements compile-time calculation of binomial coefficients.

WBinom< n, k >::value = n! / ( k!(n-k)! ).

Note
For k > n or n == k == 0, compilation fails.

Definition at line 65 of file WCompileTimeFunctions.h.

Member Enumeration Documentation

◆ anonymous enum

template<std::size_t n, std::size_t k>
anonymous enum

Using an enum here instead of a static constant.

Enumerator
value 

The computed value.

Definition at line 70 of file WCompileTimeFunctions.h.


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