Package gmisclib :: Module ortho_poly :: Class ortho
[frames] | no frames]

Class ortho

source code


Instance Methods
 
__init__(self, n=None, x=None)
Argument n is how many points you want the polynomials evaluated at.
source code
 
wt(self)
Weighting function to get orthonormality.
source code
 
x_(self, m)
Calculates the points at which the function is evaluated, if you want m evenly spaced points.
source code
 
P(self, i)
Self.P(i) is the ith orthogonal polynomial.
source code
 
expand(self, c) source code
 
compute(self, n) source code
 
wt_(self) source code
Class Variables
  registry = {}
Method Details

__init__(self, n=None, x=None)
(Constructor)

source code 

Argument n is how many points you want the polynomials evaluated at. The ordinates of the points are placed in self.x. You may alternatively specify the points as argument x, in which case the x_() function will never be called.

wt(self)

source code 

Weighting function to get orthonormality. This sets self._numwt.

x_(self, m)

source code 

Calculates the points at which the function is evaluated, if you want m evenly spaced points. By default, the function is assumed to range over the open interval (-1, 1). You can override this function in a subclass to get a different range.

P(self, i)

source code 

Self.P(i) is the ith orthogonal polynomial. The result is normalized so that numpy.sum(self.wt() * self.P(i)**2) == 1. It returns an un-shared array, so the array can be modified without affecting future calls to P(i).