|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.math.NumericalAlgorithms
public final class NumericalAlgorithms
This class contains numerical algorithms.
The implementation algorithms for the methods of this class are free to vary in order to increase performance or accuracy. Nevertheless, the signatures and assertions must be fulfilled by every implementation.
MathUtilities
,
LUDecomposition
Field Summary | |
---|---|
static int |
COMPLETE_SPLINE_INTERPOLATION
complete spline interpolation with border conditions s'(a)=f'(a) and s'(b)=f'(b). |
static int |
NATURAL_SPLINE_INTERPOLATION
natural spline interpolation with natural decay conditions s''(a)=0 and s''(b)=0. |
static int |
PERIODICAL_SPLINE_INTERPOLATION
periodical spline interpolation with periodicity conditions s'(a)=s'(b) and s''(a)=s''(b). |
Method Summary | |
---|---|
static Function |
bezierCurve(double t0,
double tz,
Matrix bezierNodes)
Bezier curve. |
static Vector |
cgSolve(Matrix A,
Vector x0,
Vector b)
cg-algorithm for solving A∙x=b iteratively starting with x0. |
static Matrix |
decomposeCholesky(Matrix A)
Cholesky-decomposition of positive definite matrices implementation. |
static Function |
dSolve(BinaryFunction f,
Real tau,
Real eta,
Real a,
Real b,
int steps,
int order)
Returns a numerical solution x of the one-dimensional differential equation x'(t) = f(t,x(t)), x(τ)=η on [a,b]. |
static Function |
dSolve(BinaryFunction f,
Real tau,
Real eta,
Real min,
Real max,
int steps,
Matrix butcher)
Returns a numerical solution x of the one-dimensional differential equation x'(t) = f(t,x(t)), x(τ)=η on [a,b]. |
static Function |
dSolve(BinaryFunction f,
Real tau,
Vector eta,
Real a,
Real b,
int steps,
int order)
Returns a numerical solution x of the differential equation x'(t) = f(t,x(t)), x(τ)=η on [a,b]. |
static Function |
dSolve(BinaryFunction f,
Real tau,
Vector eta,
Real min,
Real max,
int steps,
Matrix butcher)
Returns a numerical solution x of the differential equation x'(t) = f(t,x(t)), x(τ)=η on [a,b]. |
static Arithmetic |
integrate(Function f,
Arithmetic a,
Arithmetic b)
Returns ≈ ∫ab f dx. |
static Function |
polynomialInterpolation(Matrix A)
Polynomial interpolation. |
static Function |
splineInterpolation(int k,
Matrix A,
int interpolationType)
Spline interpolation. |
static Function |
splineInterpolation(int k,
Matrix A,
int interpolationType,
java.lang.Object[] config)
Deprecated. Use splineInterpolation(int,Matrix,int,Real,Real) , or splineInterpolation(int,Matrix,int) instead
since they have a more reasonable argument list. |
static Function |
splineInterpolation(int k,
Matrix A,
int interpolationType,
Real fp_a,
Real fp_b)
Spline interpolation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int COMPLETE_SPLINE_INTERPOLATION
public static final int NATURAL_SPLINE_INTERPOLATION
public static final int PERIODICAL_SPLINE_INTERPOLATION
Method Detail |
---|
public static Matrix decomposeCholesky(Matrix A) throws java.lang.ArithmeticException
#Multiplications = 1/6*n3, #Square Roots = n
The implementation is numerically stable.
java.lang.ArithmeticException
public static Vector cgSolve(Matrix A, Vector x0, Vector b)
public static Function polynomialInterpolation(Matrix A)
Currently implemented as polynomial interpolation with Neville.
A
- the matrix with supporting nodes.
These are row vectors (x,y) of width 2.UnivariatePolynomial
public static Function splineInterpolation(int k, Matrix A, int interpolationType)
This method is currently only implemented for cubical spline with k=4.
k
- the order of splines desired. k-1 is the grade of the piecewise interpolating polynoms.A
- the matrix with supporting nodes (the first column is the grid Δ of x-values, second column are y-values).
A must be ordered by ascending x-values.interpolationType
- specifies which type of interpolation to do (see config).
NATURAL_SPLINE_INTERPOLATION
- natural spline interpolationPERIODICAL_SPLINE_INTERPOLATION
- periodical spline interpolationNATURAL_SPLINE_INTERPOLATION
,
PERIODICAL_SPLINE_INTERPOLATION
,
splineInterpolation(int,Matrix,int,Real,Real)
,
COMPLETE_SPLINE_INTERPOLATION
public static Function splineInterpolation(int k, Matrix A, int interpolationType, Real fp_a, Real fp_b)
This method is currently only implemented for cubical spline with k=4.
k
- the order of splines desired. k-1 is the grade of the piecewise interpolating polynoms.A
- the matrix with supporting nodes (the first column is the grid Δ of x-values, second column are y-values).
A must be ordered by ascending x-values.interpolationType
- specifies which type of interpolation to do
COMPLETE_SPLINE_INTERPOLATION
- complete spline interpolation.fp_a
- the value f'(a) of the derivative of f at a.fp_b
- the value f'(b) of the derivative of f at b.
COMPLETE_SPLINE_INTERPOLATION
,
splineInterpolation(int,Matrix,int)
,
NATURAL_SPLINE_INTERPOLATION
,
PERIODICAL_SPLINE_INTERPOLATION
public static Function splineInterpolation(int k, Matrix A, int interpolationType, java.lang.Object[] config)
splineInterpolation(int,Matrix,int,Real,Real)
, or splineInterpolation(int,Matrix,int)
instead
since they have a more reasonable argument list.
public static Function bezierCurve(double t0, double tz, Matrix bezierNodes)
Currently implemented with de Casteljau.
t0
- the starting point in the parameter interval [t0,..tz].tz
- the ending point in the parameter interval [t0,..tz].bezierNodes
- the row-vectors specify the bezier nodes in the given order.
public static Arithmetic integrate(Function f, Arithmetic a, Arithmetic b)
Currently implemented as Newton-Cotes numerical integration.
MathUtilities.integrate(orbital.math.functional.Function, Arithmetic, Arithmetic)
public static Function dSolve(BinaryFunction f, Real tau, Vector eta, Real a, Real b, int steps, int order)
Currently implemented as an explicit Runge-Kutta method.
f
- the right-hand side of the differential equation.tau
- the initial time τ of the initial values η.eta
- the vector η of initial values.steps
- the number m of discretisation steps defining h=(a-b)/m.order
- the desired order p of the global discretisation error, i.e., with errors in O(hp).
AlgebraicAlgorithms.dSolve(Matrix,Vector,Real,Vector)
public static Function dSolve(BinaryFunction f, Real tau, Vector eta, Real min, Real max, int steps, Matrix butcher)
Implements the explicit Runge-Kutta with given Butcher tableau.
dSolve(orbital.math.functional.BinaryFunction,Real,Vector,Real,Real,int,int)
.
butcher
- is a consistent Butcher tableau
c1 | ||||
c2 | a2,1 | |||
c3 | a3,1 | a3,2 | ||
... | ... | |||
cs | as,1 | as,2 | ... | as,s-1 |
dSolve(orbital.math.functional.BinaryFunction,Real,Vector,Real,Real,int,int)
public static Function dSolve(BinaryFunction f, Real tau, Real eta, Real a, Real b, int steps, int order)
dSolve(orbital.math.functional.BinaryFunction,Real,Vector,Real,Real,int,int)
public static Function dSolve(BinaryFunction f, Real tau, Real eta, Real min, Real max, int steps, Matrix butcher)
dSolve(orbital.math.functional.BinaryFunction,Real,Vector,Real,Real,int,int)
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |