Package src :: Package toplevel :: Module FTSM :: Class SplineInterpolator
[hide private]
[frames] | no frames]

Class SplineInterpolator

source code

Cubic spline interpolator.

Instance Methods [hide private]
 
__init__(self) source code
 
SetTridiagonalSystem(self, x, y, num)
Set up the tridiagonal system
source code
 
FindLU(self, num)
Construct two bi-diagonal matrices L and U.
source code
 
LBiDiSol(self, num)
Lower Bi-diagonal solver.
source code
list
UBiDiSol(self, num)
Upper Bi-diagonal solver.
source code
int @return Index into x values
locate(self, x, k)
Locate where in the x points the passed value falls
source code
list
EvalSpline(self, x, y, S, nx)
Evaluate approximated function at values nx
source code
list
Spline(self, x, y)
Highest level routine for setting up member matrices.
source code
list
SmoothingAndReparameterization(self, x, y, xx, yy, num)
Reparameterize by arc length
source code
Instance Variables [hide private]
  diag
Middle diagonal elements
  u_diag
Upper diagonal elements
  l_diag
Lower diagonal elements
  R
Right hand side
  L
Lower bidiagonal matrix
  U
Upper bidiagonal matrix
  xx
Holds solution
Method Details [hide private]

SetTridiagonalSystem(self, x, y, num)

source code 

Set up the tridiagonal system

Parameters:
  • x (list) - x values
  • y (list) - y values
  • num (int) - Number of points

FindLU(self, num)

source code 

Construct two bi-diagonal matrices L and U.

Parameters:
  • num (int) - Number of points

LBiDiSol(self, num)

source code 

Lower Bi-diagonal solver. Solves lower bi-diagonal system Lx = b

Parameters:
  • num (int) - Number of points

UBiDiSol(self, num)

source code 

Upper Bi-diagonal solver.

Parameters:
  • num (int) - Number of points
Returns: list
Solution to uper bi-diagonal system

locate(self, x, k)

source code 

Locate where in the x points the passed value falls

Parameters:
  • x (list) - List of x values
  • k (float) - Value
Returns: int @return Index into x values

EvalSpline(self, x, y, S, nx)

source code 

Evaluate approximated function at values nx

Parameters:
  • x (list) - X values
  • y (list) - Y values
  • S (list) - Appropximated function
  • nx (list) - Values at which to evaluate
Returns: list
Approximated function values

Spline(self, x, y)

source code 

Highest level routine for setting up member matrices.

Parameters:
  • x (list) - X values
  • y (list) - Y values
Returns: list
Interpolated values

SmoothingAndReparameterization(self, x, y, xx, yy, num)

source code 

Reparameterize by arc length

Parameters:
  • x (list) - X values
  • y (list) - Y values
  • xx (list) - Linear space
  • yy (list) - Corresponding spline values
  • num (int) - Number of (x,y) points
Returns: list
(x,y) points after reparameterization