All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jDisco.Function

java.lang.Object
   |
   +----jDisco.Linkage
           |
           +----jDisco.Link
                   |
                   +----jDisco.Continuous
                           |
                           +----jDisco.Function

public class Function
extends jDisco.Continuous
The solution of higher-order differential equations normally requires that the user rewrites the system as first-order equations. The class Function frees the user from this task.

A Function-object represents a variable whose continuous change can be described by an n'th order differential equation. The d array of an object contains the derivatives; d(i).state contains the i'th derivative (d(0).state contains the function value itself).

d(i).rate should not be used by the user.

Example:

The second-order equation of Van der Pol:

      d2y/dt2 + E(1-y2)dy/dt + y = 0
 
may be represented by:
 
      y.d(2).state = - E * (1 - Math.pow(y.d(0).state, 2)) * y.d(1).state
                     - y.d(0).state;
 
where y is a Function-object with n = 2.

Note that y must be started to undergo continuous change.


Constructor Index

 o Function(int)
Constructs a n'th order Function-object.

Method Index

 o d(int)
Returns the i'th derivative
 o derivatives()
Computes derivatives of n internal variables.
 o start()
Starts the continuous change of this function.
 o stop()
Stops the continuous change of this function.

Constructors

 o Function
 public Function(int n)
Constructs a n'th order Function-object.

Methods

 o start
 public jDisco.Continuous start()
Starts the continuous change of this function.

Returns:
this.
Overrides:
start in class jDisco.Continuous
 o stop
 public void stop()
Stops the continuous change of this function.

Overrides:
stop in class jDisco.Continuous
 o d
 public jDisco.Variable d(int i)
Returns the i'th derivative

 o derivatives
 protected final void derivatives()
Computes derivatives of n internal variables.

Overrides:
derivatives in class jDisco.Continuous

All Packages  Class Hierarchy  This Package  Previous  Next  Index