Go::Binomial Class Reference
[Implicitization]

Class that computes the binomial coefficients. More...

#include <Binomial.h>

List of all members.

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.


Detailed Description

Class that computes the binomial coefficients.

Definition at line 50 of file Binomial.h.


Constructor & Destructor Documentation

Go::Binomial::Binomial ( int  n  )  [inline]

Constructor that creates an initial Pascal's triangle to some specified level.

Parameters:
n the level up to which you want to make the triangle

Definition at line 67 of file Binomial.h.


Member Function Documentation

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.

Parameters:
n an integer
i an integer
Returns:

\[ {n \choose i} \]

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.

Parameters:
n an integer
Returns:
an iterator iter such that iter[i] = operator()(n,i).

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.

Parameters:
n an integer
i an integer
j an integer
Returns:

\[\frac{n!}{i!j!(n-i-j)!}.\]

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.

Parameters:
n an integer
i an integer
j an integer
k an integer
Returns:

\[\frac{n!}{i!j!k!(n-i-j-k)!.}\]

Definition at line 123 of file Binomial.h.


The documentation for this class was generated from the following file:
Generated on Mon Jun 11 15:13:16 2007 for GoTools Implicitization Library by  doxygen 1.5.1