org.jcurl.math
Class Polynome

Package class diagram package Polynome
java.lang.Object
  extended by org.jcurl.math.R1RNFunctionImpl
      extended by org.jcurl.math.R1R1Function
          extended by org.jcurl.math.Polynome
All Implemented Interfaces:
Serializable, R1RNFunction

public class Polynome
extends R1R1Function

Polynomes of n-th grade.

Version:
$Id: Polynome.java 1031 2009-07-23 15:06:05Z mro $
Author:
M. Rohrmoser
See Also:
Serialized Form

Field Summary
(package private)  double[] params
           
 
Constructor Summary
Polynome(double[] params)
           
 
Method Summary
 double at(double x, int c)
          Compute the c'th derivative at x.
(package private) static long fak(int a)
          Compute a!
(package private) static long fak(int high, int low)
          Compute high!
static Polynome getPoly(double t0, double x0, double v0, double a0)
          Convenience method to get the "bewegungsgleichung" for a given initial state.
static double[] getPolyParams(double t0, double x0, double v0, double a0)
          Convenience method to get the "bewegungsgleichung" for a given initial state.
static double poly(double x, double[] p)
          Compute the polynome p at x.
static double poly(double x, int c, double[] p)
          Compute the c-th derivative of the polynome p at x.
 String toString()
           
static String toString(double[] poly)
           
 
Methods inherited from class org.jcurl.math.R1R1Function
at, at
 
Methods inherited from class org.jcurl.math.R1RNFunctionImpl
at, at, dim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

params

final double[] params
Constructor Detail

Polynome

public Polynome(double[] params)
Method Detail

fak

static long fak(int a)
Compute a!

Parameters:
a -
Returns:
a!

fak

static long fak(int high,
                int low)
Compute high! / low!

Parameters:
high -
low -
Returns:
high! / low!

getPoly

public static final Polynome getPoly(double t0,
                                     double x0,
                                     double v0,
                                     double a0)
Convenience method to get the "bewegungsgleichung" for a given initial state.

Parameters:
t0 - initial time
x0 - initial location
v0 - initial speed
a0 - constant acceleration
Returns:
the resulting polynome
See Also:
getPolyParams(double, double, double, double)

getPolyParams

public static final double[] getPolyParams(double t0,
                                           double x0,
                                           double v0,
                                           double a0)
Convenience method to get the "bewegungsgleichung" for a given initial state.

Parameters:
t0 - initial time
x0 - initial location
v0 - initial speed
a0 - constant acceleration
Returns:
the resulting polynome's parameters

poly

public static double poly(double x,
                          double[] p)
Compute the polynome p at x.

Parameters:
x -
p - polynome coefficients
Returns:
p(x)
See Also:
poly(double, int, double[])

poly

public static double poly(double x,
                          int c,
                          double[] p)
Compute the c-th derivative of the polynome p at x.

Parameters:
x -
c - derivative
p - polynome coefficients
Returns:
d/dx^c p(x)

toString

public static String toString(double[] poly)

at

public double at(double x,
                 int c)
Description copied from class: R1R1Function
Compute the c'th derivative at x.

Specified by:
at in class R1R1Function
Parameters:
x -
c -
Returns:
the value
See Also:
poly(double, int, double[])

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2005-2009 JCurl.mro.name. All Rights Reserved.