VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
fmm::detail::BinomNewton_wrapper< n > Struct Template Reference

#include <simple_math.h>

Collaboration diagram for fmm::detail::BinomNewton_wrapper< n >:

Public Member Functions

constexpr BinomNewton_wrapper ()
 
constexpr double operator() (int p, int q) const
 

Public Attributes

std::array< double, n *n > cft
 
int dim
 

Detailed Description

template<int n>
struct fmm::detail::BinomNewton_wrapper< n >

Definition at line 29 of file simple_math.h.

Constructor & Destructor Documentation

◆ BinomNewton_wrapper()

template<int n>
constexpr fmm::detail::BinomNewton_wrapper< n >::BinomNewton_wrapper ( )
inlineconstexpr

Definition at line 34 of file simple_math.h.

34 : cft(), dim(n)
35 {
36 cft[0 * dim + 0] = 1.0;
37
38 for (int i = 1; i < n; ++i)
39 {
40 cft[i * dim + 0] = 1.0;
41 cft[i * dim + i] = 1.0;
42 for (int j = 1; j < i; ++j)
43 cft[i * dim + j] = cft[(i - 1) * dim + j] + cft[(i - 1) * dim + (j - 1)];
44 }
45 }
std::array< double, n *n > cft
Definition simple_math.h:31

Member Function Documentation

◆ operator()()

template<int n>
constexpr double fmm::detail::BinomNewton_wrapper< n >::operator() ( int  p,
int  q 
) const
inlineconstexpr

Definition at line 46 of file simple_math.h.

47 {
48 return cft[p * dim + q];
49 }

Member Data Documentation

◆ cft

template<int n>
std::array<double, n * n> fmm::detail::BinomNewton_wrapper< n >::cft

Definition at line 31 of file simple_math.h.

◆ dim

template<int n>
int fmm::detail::BinomNewton_wrapper< n >::dim

Definition at line 32 of file simple_math.h.


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