spring
Class SpringEquation


java.lang.Object

  extended byspring.SpringEquation

All Implemented Interfaces:
Equation

public class SpringEquation
extends java.lang.Object
implements Equation

Spring equation with two monotonic functions in place of damping and stiffness.

dx/dt = v

dv/dt = -f(x)-g(v)

Author:
A.K.Nircan

Field Summary
(package private)  Monotonic f
           
(package private)  java.util.Map fvg
           
(package private)  Monotonic g
           
 
Constructor Summary
SpringEquation(Monotonic f, Monotonic g)
          Constructor with two monotonic functions: f(x) and g(v).
 
Method Summary
 double[] derivs(double x, double[] y)
          Returns derivatives using x and y
 int getNVar()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

f


Monotonic f

g


Monotonic g

fvg


java.util.Map fvg
Constructor Detail

SpringEquation


public SpringEquation(Monotonic f,
                      Monotonic g)
Constructor with two monotonic functions: f(x) and g(v). Here x is displacement and v is velocity.

Parameters:
f -
g -
Method Detail

derivs


public double[] derivs(double x,
                       double[] y)
Description copied from interface: Equation
Returns derivatives using x and y

Specified by:
derivs in interface Equation
Parameters:
x -
y - is variables
Returns:
derivatives

getNVar


public int getNVar()
Specified by:
getNVar in interface Equation
Returns:
number of variables