spring
Class SpringEquation
java.lang.Object
spring.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
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 |
f
Monotonic f
g
Monotonic g
fvg
java.util.Map fvg
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
-
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