jphase
Class SuperErlang

java.lang.Object
  extended by jphase.SuperErlang
All Implemented Interfaces:
java.io.Serializable

public class SuperErlang
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static SuperErlang ONE
          The number one (1)
 
Constructor Summary
SuperErlang()
          f(x) = 0.0
SuperErlang(double cf, int n, double lbd)
          f(x) = cf E(n,lbd)
SuperErlang(Term trm)
          f(x) = t
 
Method Summary
 SuperErlang addTerm(double coeff, int power, double lmb)
           
 SuperErlang addTerm(Term tr)
           
 java.lang.Object clone()
          Clones this function
static SuperErlang convolution(SuperErlang f1, SuperErlang f2)
          Return the convolution of this two functions
 double defIntegrate()
          Returns the integral from 0 to infinity of this function.
 double defIntegrate(double x)
          Returns the definite integral from 0 to x of this function
 SuperErlang derive()
          Rturns the derivative at t of this function.
protected  double exp()
           
 SuperErlang expand(double a)
          Evaluates f(t) at a*t.
 SuperErlang integrate()
          Rturns the integral from 0 to t of this function.
 SuperErlang integrateCom()
          Rturns the integral from t to infinity of this function.
 boolean isZero()
          Detrmines whethr this function is identically equal to 0
protected  double moment(int k)
           
 SuperErlang move(double a)
          Evaluates the function at t+a
 SuperErlang multiply(SuperErlang f2)
          Multiply the function f2 with this function
static SuperErlang multiply(SuperErlang f1, SuperErlang f2)
          Return the product of this two functions
 int numTerms()
          Returns the number of terms.
static SuperErlang poly(double coef, int n)
          Return a monomy c t^n
 SuperErlang sum(SuperErlang f2)
          Sums the function f2 to this function
static SuperErlang sum(SuperErlang f1, SuperErlang f2)
          Return the sum of this two functions
 Term term(int i)
          Returns the i-th term.
 SuperErlang times(double cons)
          Returns this function times the constant
 java.lang.String toString()
           
 java.lang.String toStringE()
          String representation using the notation p1E(n1,a2) + p2E(n2,a2) + ... where E(n,a) = a^n x^(n-1) e^(-a x) / (n-1)!, is an Erlang pdf.
 java.lang.String toStringP()
          String representation using the notation p1P(n1,a2) + p2P(n2,a2) + ... where E(n,a) = (a x)^n e^(-a x) / n!, is a poisson cdf..
 java.lang.String toStringRTF()
          String representation in RTF
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ONE

public static SuperErlang ONE
The number one (1)

Constructor Detail

SuperErlang

public SuperErlang()
f(x) = 0.0


SuperErlang

public SuperErlang(Term trm)
f(x) = t

Parameters:
trm -

SuperErlang

public SuperErlang(double cf,
                   int n,
                   double lbd)
f(x) = cf E(n,lbd)

Parameters:
cf -
n -
lbd -
Method Detail

poly

public static SuperErlang poly(double coef,
                               int n)
Return a monomy c t^n

Parameters:
coef -
n -
Returns:
c t^n

isZero

public boolean isZero()
Detrmines whethr this function is identically equal to 0

Returns:
true if f(x) == 0.0

addTerm

public SuperErlang addTerm(double coeff,
                           int power,
                           double lmb)
Parameters:
coeff -
power -
lmb -
Returns:
f(x) := f(x) + coeff E(power, lmb)

addTerm

public SuperErlang addTerm(Term tr)
Parameters:
tr -
Returns:
f(x) := f(x) + tr

numTerms

public int numTerms()
Returns the number of terms.

Returns:
Number of terms

term

public Term term(int i)
Returns the i-th term.

Parameters:
i - The 0based index.
Returns:
The i-th term

exp

protected double exp()
Returns:
expected falue for the given pdf

moment

protected double moment(int k)
Parameters:
k -
Returns:
k-th moment

clone

public java.lang.Object clone()
Clones this function

Overrides:
clone in class java.lang.Object

sum

public SuperErlang sum(SuperErlang f2)
Sums the function f2 to this function

Parameters:
f2 -
Returns:
f(x) := f(x) + f2(x)

sum

public static SuperErlang sum(SuperErlang f1,
                              SuperErlang f2)
Return the sum of this two functions

Parameters:
f1 -
f2 -
Returns:
f1+f2

times

public SuperErlang times(double cons)
Returns this function times the constant

Parameters:
cons -
Returns:
cons * f(x)

expand

public SuperErlang expand(double a)
Evaluates f(t) at a*t.

Parameters:
a -
Returns:
f(a x)

move

public SuperErlang move(double a)
Evaluates the function at t+a

Parameters:
a -
Returns:
f(t+a)

multiply

public SuperErlang multiply(SuperErlang f2)
Multiply the function f2 with this function

Parameters:
f2 -
Returns:
f(x) x f2(x)

multiply

public static SuperErlang multiply(SuperErlang f1,
                                   SuperErlang f2)
Return the product of this two functions

Parameters:
f1 -
f2 -
Returns:
f1(x) x f2(x)

derive

public SuperErlang derive()
Rturns the derivative at t of this function.

Returns:
f'(x)

integrate

public SuperErlang integrate()
Rturns the integral from 0 to t of this function.

Returns:
int_0^x f(t)dt

integrateCom

public SuperErlang integrateCom()
Rturns the integral from t to infinity of this function.

Returns:
int_x^infty f(t)dt

defIntegrate

public double defIntegrate()
Returns the integral from 0 to infinity of this function.

Returns:
integral value

defIntegrate

public double defIntegrate(double x)
Returns the definite integral from 0 to x of this function

Parameters:
x -
Returns:
int_0^x f(t)dt

convolution

public static SuperErlang convolution(SuperErlang f1,
                                      SuperErlang f2)
Return the convolution of this two functions

Parameters:
f1 -
f2 -
Returns:
f1 * f2(x)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringRTF

public java.lang.String toStringRTF()
String representation in RTF

Returns:
string

toStringE

public java.lang.String toStringE()
String representation using the notation p1E(n1,a2) + p2E(n2,a2) + ... where E(n,a) = a^n x^(n-1) e^(-a x) / (n-1)!, is an Erlang pdf.

Returns:
Erlang type representation.

toStringP

public java.lang.String toStringP()
String representation using the notation p1P(n1,a2) + p2P(n2,a2) + ... where E(n,a) = (a x)^n e^(-a x) / n!, is a poisson cdf..

Returns:
Erlang type representation.