VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
fmm::BinomNewton Class Reference

#include <simple_math.h>

Collaboration diagram for fmm::BinomNewton:

Public Member Functions

 BinomNewton (int n)
 
double operator() (int p, int q) const
 

Public Attributes

std::vector< double > cft
 
int dim
 

Detailed Description

Definition at line 56 of file simple_math.h.

Constructor & Destructor Documentation

◆ BinomNewton()

fmm::BinomNewton::BinomNewton ( int  n)
inline

Definition at line 63 of file simple_math.h.

64 : dim(n + 1)
65 {
66 cft.resize(dim * dim, 0.0);
67 cft[0 * dim + 0] = 1.0;
68
69 for (int i = 1; i <= n; ++i)
70 {
71 cft[i * dim + 0] = 1.0;
72 cft[i * dim + i] = 1.0;
73 for (int j = 1; j < i; ++j)
74 cft[i * dim + j] = cft[(i - 1) * dim + j] + cft[(i - 1) * dim + (j - 1)];
75 }
76 }
std::vector< double > cft
Definition simple_math.h:59

Member Function Documentation

◆ operator()()

double fmm::BinomNewton::operator() ( int  p,
int  q 
) const
inline

Definition at line 78 of file simple_math.h.

79 {
80 return cft[p * dim + q];
81 }

Member Data Documentation

◆ cft

std::vector<double> fmm::BinomNewton::cft

Definition at line 59 of file simple_math.h.

◆ dim

int fmm::BinomNewton::dim

Definition at line 60 of file simple_math.h.


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