#include <Binomial.h>
Public Types | |
typedef std::vector< double >::iterator | iter |
Useful iterator. | |
Public Member Functions | |
Binomial () | |
Default constructor. | |
Binomial (int n) | |
Constructor that creates an initial Pascal's triangle to some specified level. | |
double | operator() (int n, int i) |
Evaluates a binomial coefficient. | |
iter | operator[] (int n) |
Gives an iterator to the first element of the vector containing the n'th line of Pascal's triangle. | |
double | trinomial (int n, int i, int j) |
Evaluates a trinomial coefficient. | |
double | quadrinomial (int n, int i, int j, int k) |
Evaluates a quadrinomial coefficient. |
Definition at line 50 of file Binomial.h.
Go::Binomial::Binomial | ( | int | n | ) | [inline] |
Constructor that creates an initial Pascal's triangle to some specified level.
n | the level up to which you want to make the triangle |
Definition at line 67 of file Binomial.h.
double Go::Binomial::operator() | ( | int | n, | |
int | i | |||
) | [inline] |
Evaluates a binomial coefficient.
If the current table is too small, the table will be expanded accordingly.
n | an integer | |
i | an integer |
Definition at line 78 of file Binomial.h.
iter Go::Binomial::operator[] | ( | int | n | ) | [inline] |
Gives an iterator to the first element of the vector containing the n'th line of Pascal's triangle.
Expands the table if necessary.
n | an integer |
Definition at line 92 of file Binomial.h.
double Go::Binomial::trinomial | ( | int | n, | |
int | i, | |||
int | j | |||
) | [inline] |
Evaluates a trinomial coefficient.
This function should be considered a temporary solution.
n | an integer | |
i | an integer | |
j | an integer |
Definition at line 106 of file Binomial.h.
Referenced by Go::BezierTriangle< N >::interpolate().
double Go::Binomial::quadrinomial | ( | int | n, | |
int | i, | |||
int | j, | |||
int | k | |||
) | [inline] |
Evaluates a quadrinomial coefficient.
This function should be considered a temporary solution.
n | an integer | |
i | an integer | |
j | an integer | |
k | an integer |
Definition at line 123 of file Binomial.h.