Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
model::CombinationWithRepetition< _N, _k > Struct Template Reference

#include <CombinationWithRepetition.h>

Collaboration diagram for model::CombinationWithRepetition< _N, _k >:

Static Public Member Functions

template<typename T>
static Eigen::Matrix< T, value, k > combine (const Eigen::Matrix< T, 1, N > &pool)

Static Public Attributes

static constexpr int N =_N
static constexpr int k =_k
static constexpr int value =CTM::binomial(N+k-1,k)

Detailed Description

template<int _N, int _k>
struct model::CombinationWithRepetition< _N, _k >

Class template that computes C(N,k), the combination without repetition of k values taken from a pool of N values.

C(N,k) represents the number of ways to form un-ordered sets of k objects taken from a pool of N objects if repetition is not allowed.

Definition at line 26 of file CombinationWithRepetition.h.

Member Function Documentation

◆ combine()

template<int _N, int _k>
template<typename T>
Eigen::Matrix< T, value, k > model::CombinationWithRepetition< _N, _k >::combine ( const Eigen::Matrix< T, 1, N > & pool)
inlinestatic
Parameters
[in]poola row vector of N values
Returns
a matrix having in each row the

Definition at line 36 of file CombinationWithRepetition.h.

Member Data Documentation

◆ k

template<int _N, int _k>
int model::CombinationWithRepetition< _N, _k >::k =_k
staticconstexpr

Definition at line 29 of file CombinationWithRepetition.h.

◆ N

template<int _N, int _k>
int model::CombinationWithRepetition< _N, _k >::N =_N
staticconstexpr

Definition at line 28 of file CombinationWithRepetition.h.

◆ value

template<int _N, int _k>
int model::CombinationWithRepetition< _N, _k >::value =CTM::binomial(N+k-1,k)
staticconstexpr

Definition at line 32 of file CombinationWithRepetition.h.


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