Teetool
Probabilistic modelling of trajectories
Public Member Functions | Private Member Functions | Private Attributes | List of all members
teetool.basis.Basis Class Reference

Basis class supports the evaluation of a basis function. More...

Inheritance diagram for teetool.basis.Basis:

Public Member Functions

def __init__ (self, basisType, nbasis, ndim)
 The constructor of Basis. More...
 
def get (self, x)
 obtain basis functions at specific points, block-diagonal More...
 

Private Member Functions

def _get_1d (self, x)
 obtain basis functions at specific points More...
 
def _getBasisRbf (self, x_vec, nbasis)
 evaluates the rbf basis function More...
 
def _getBasisRbfVector (self, x_sca, nbasis)
 evaluates the rbf basis function for a single x More...
 
def _funcRbf (self, x, mu1, sig1)
 evaluates a single rbf basis function for a single x More...
 
def _getBasisBernstein (self, x_vec, nbasis)
 evaluates the Bernstein basis function in [0, 1] using the formula $B(N,I)(X) = [N!/(I!*(N-I)!)] * (1-X)^(N-I) * X^I$ More...
 
def _getBasisBernsteinVector (self, x_sca, nbasis)
 evaluates the Bernstein basis function in [0, 1] using the formula $B(N,I)(X) = [N!/(I!*(N-I)!)] * (1-X)^(N-I) * X^I$ for a single x More...
 

Private Attributes

 _basisType
 'rbf' or 'bernstein' basis type More...
 
 _nbasis
 number of basis functions More...
 
 _ndim
 number of dimensions More...
 
 _range
 defines range of basis function More...
 

Detailed Description

Basis class supports the evaluation of a basis function.

These Basis functions function on the domain [0,1], however produce these on multiple dimensions by returning a block-diagonal matrix. Hence an identical basis function gets returned on each dimension.

Constructor & Destructor Documentation

§ __init__()

def teetool.basis.Basis.__init__ (   self,
  basisType,
  nbasis,
  ndim 
)

The constructor of Basis.

Parameters
selfobject pointer
basisType'rbf' or 'bernstein' basis-type where 'rbf' = uniformly distributed basis functions and 'bernstein' = Bernstein polynomials
nbasisnumber of basis functions used
ndimnumber of dimensions trajectories

Member Function Documentation

§ _funcRbf()

def teetool.basis.Basis._funcRbf (   self,
  x,
  mu1,
  sig1 
)
private

evaluates a single rbf basis function for a single x

Parameters
selfThe object pointer.
xpoint to evaluate [1 x 1]
mu1centre of rbf
sig1standard deviation of rbf
Returns
values of rbf basis functions [1 x nbasis]

§ _get_1d()

def teetool.basis.Basis._get_1d (   self,
  x 
)
private

obtain basis functions at specific points

Parameters
selfThe object pointer.
xpoints to evaluate [npoints x 1]
Returns
values of basis functions [npoints x nbasis]

§ _getBasisBernstein()

def teetool.basis.Basis._getBasisBernstein (   self,
  x_vec,
  nbasis 
)
private

evaluates the Bernstein basis function in [0, 1] using the formula $B(N,I)(X) = [N!/(I!*(N-I)!)] * (1-X)^(N-I) * X^I$

Parameters
selfThe object pointer.
x_vecpoints to evaluate [npoints x 1]
nbasisnumber of basis functions (= polynomial degree + 1)
Returns
values of Bernstein basis functions [npoints x nbasis]

§ _getBasisBernsteinVector()

def teetool.basis.Basis._getBasisBernsteinVector (   self,
  x_sca,
  nbasis 
)
private

evaluates the Bernstein basis function in [0, 1] using the formula $B(N,I)(X) = [N!/(I!*(N-I)!)] * (1-X)^(N-I) * X^I$ for a single x

Parameters
selfThe object pointer.
x_scapoint to evaluate [1 x 1]
nbasisnumber of basis functions (= polynomial degree + 1)
Returns
values of Bernstein basis functions [npoints x nbasis]

§ _getBasisRbf()

def teetool.basis.Basis._getBasisRbf (   self,
  x_vec,
  nbasis 
)
private

evaluates the rbf basis function

Parameters
selfThe object pointer.
x_vecpoints to evaluate [npoints x 1]
nbasisnumber of basis functions
Returns
values of rbf basis functions [npoints x nbasis]

§ _getBasisRbfVector()

def teetool.basis.Basis._getBasisRbfVector (   self,
  x_sca,
  nbasis 
)
private

evaluates the rbf basis function for a single x

Parameters
selfThe object pointer.
x_scapoint to evaluate [1 x 1]
nbasisnumber of basis functions
Returns
values of rbf basis functions [1 x nbasis]

§ get()

def teetool.basis.Basis.get (   self,
  x 
)

obtain basis functions at specific points, block-diagonal

Parameters
selfThe object pointer.
xpoints to evaluate [npoints x 1]
Returns
values of basis functions [ndim*npoints x ndim*nbasis]

Member Data Documentation

§ _basisType

teetool.basis.Basis._basisType
private

'rbf' or 'bernstein' basis type

§ _nbasis

teetool.basis.Basis._nbasis
private

number of basis functions

§ _ndim

teetool.basis.Basis._ndim
private

number of dimensions

§ _range

teetool.basis.Basis._range
private

defines range of basis function


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