public class JOde extends java.lang.Object implements java.lang.Runnable, VField, Constraints, java.io.Serializable
JOde
implements the functionality of an
interactive ODE solver, or a tool for studying simple differential equations.
Its capabilities include
Modifier and Type | Field and Description |
---|---|
static int |
ABSCISSA
Constant
ABSCISSA is the number
of the axis which will be the abscissa of the coordinate system
in the default GUI configuration. |
static int |
MAX_STEPS_THRESHOLD
Constant
MAX_STEPS_THRESHOLD is
the maximal number of steps for numerical solvers. |
static int |
ORDINATE
Constant
ORDINATE is the number
of the axis which will be the ordinate of the coordinate system
in the default GUI configuration. |
static int |
RANGE_MAX
Constant
RANGE_MAX represents the default for maximum
of the range of a variable. |
static int |
RANGE_MIN
Constant
RANGE_MIN represents the default for minimum
of the range of a variable. |
static boolean |
USING_FORMAT_FOR_TICKS
If set, DecimalFormat is used to format tick labels.
|
Constructor and Description |
---|
JOde()
Constructor without parameters
|
JOde(java.lang.String[] args,
java.applet.Applet applet,
java.lang.String options)
Creates a new
JOde instance. |
JOde(java.lang.String[] args,
java.applet.Applet applet,
java.lang.String options,
java.awt.Dimension preferredSize)
Constructor using command-line-like arguments
|
Modifier and Type | Method and Description |
---|---|
void |
addControls()
Initialize input controls for a slopes diagram
|
double |
evalString(java.lang.String s)
Describe
evalString method here. |
double |
evalString(java.lang.String s,
boolean silent)
Describe
evalString method here. |
boolean |
evaluateAt(double[] y,
double[] y1)
Implements VField interface.
|
boolean |
evaluateFormulas(com.rychlik.jode.JOde.FormulaControl[] formulaControls,
double[] values)
Evaluate a sequence of formulas.
|
java.applet.Applet |
getApplet()
Get the Applet value.
|
JOdeFrame |
getFrame()
Get the Frame value.
|
java.lang.String |
getTitle()
Get the Title value.
|
java.lang.String |
initConditionToString(double[] data,
boolean isAutonomous)
Describe
initConditionToString method here. |
java.lang.String |
initConditionToString(java.lang.String label,
double[] data,
boolean isAutonomous)
Describe
initConditionToString method here. |
static void |
main(java.lang.String[] args)
This method allows this class to be run
as a standalone application.
|
double[] |
makeInitCondition(com.rychlik.jode.JOde.UserPoint p)
Describe
makeInitCondition method here. |
void |
printCanvas()
Describe
printCanvas method here. |
void |
printPanel()
Describe
printPanel method here. |
void |
printPhaseDiagram()
Describe
printPhaseDiagram method here. |
void |
quit()
The method
quit removes this JODe panel from the
applet and the frame and waits to be garbage-collected. |
void |
run()
Run all calculations.
|
boolean |
satisfies(double[] y)
Implements Constraints interface.
|
void |
setApplet(java.applet.Applet newApplet)
Set the Applet value.
|
void |
setFrame(JOdeFrame newFrame)
Set the Frame value.
|
void |
setTitle(java.lang.String newTitle)
Set the Title value.
|
void |
showFrame(boolean on)
The method
showFrame
switches the container between the frame
and the applet. |
void |
start()
Describe
start method here. |
void |
startCalculation()
The
startCalculation method initiates the
calculation corresponding to the current applet settings. |
void |
stop()
Describe
stop method here. |
void |
stopCalculation()
The
stopCalculation method stops any running
calculation. |
void |
updateVariableNames()
Describe
updateVariableNames method here. |
public static final boolean USING_FORMAT_FOR_TICKS
public static final int RANGE_MIN
RANGE_MIN
represents the default for minimum
of the range of a variable.public static final int RANGE_MAX
RANGE_MAX
represents the default for maximum
of the range of a variable.public static final int MAX_STEPS_THRESHOLD
MAX_STEPS_THRESHOLD
is
the maximal number of steps for numerical solvers.public static final int ABSCISSA
ABSCISSA
is the number
of the axis which will be the abscissa of the coordinate system
in the default GUI configuration.public static final int ORDINATE
ORDINATE
is the number
of the axis which will be the ordinate of the coordinate system
in the default GUI configuration.public JOde(java.lang.String[] args, java.applet.Applet applet, java.lang.String options, java.awt.Dimension preferredSize)
args
- a String
valueapplet
- an Applet
valueoptions
- a String
valuepreferredSize
- a Dimension
valuepublic JOde(java.lang.String[] args, java.applet.Applet applet, java.lang.String options)
JOde
instance.args
- a String
valueapplet
- an Applet
valueoptions
- a String
valuepublic JOde()
public void start()
start
method here.public void stop()
stop
method here.public final double evalString(java.lang.String s) throws ParseException
evalString
method here.s
- a String
valuedouble
valueParseException
- if an error occurspublic final double evalString(java.lang.String s, boolean silent) throws ParseException
evalString
method here.s
- a String
valuesilent
- a boolean
valuedouble
valueParseException
- if an error occurspublic boolean satisfies(double[] y)
satisfies
in interface Constraints
y
- The point in the phase space.public final boolean evaluateAt(double[] y, double[] y1)
evaluateAt
in interface VField
y
- Point where to evaluate vector field.y1
- Vector field.public final boolean evaluateFormulas(com.rychlik.jode.JOde.FormulaControl[] formulaControls, double[] values)
formulaControls
- a FormulaControl
valuevalues
- a double[]
valuepublic void run()
run
in interface java.lang.Runnable
public void updateVariableNames()
updateVariableNames
method here.public double[] makeInitCondition(com.rychlik.jode.JOde.UserPoint p)
makeInitCondition
method here.p
- an UserPoint
valuedouble[]
valuepublic void addControls()
public final void printCanvas()
printCanvas
method here.public final void printPanel()
printPanel
method here.public final void printPhaseDiagram()
printPhaseDiagram
method here.public final void showFrame(boolean on)
showFrame
switches the container between the frame
and the applet. An instructive message
is displayed in the applet window if
the frame is used with an applet.on
- a boolean
valuepublic final java.lang.String initConditionToString(double[] data, boolean isAutonomous)
initConditionToString
method here.data
- a double[]
valueisAutonomous
- a boolean
valueString
valuepublic final java.lang.String initConditionToString(java.lang.String label, double[] data, boolean isAutonomous)
initConditionToString
method here.label
- a String
valuedata
- a double[]
valueisAutonomous
- a boolean
valueString
valuepublic JOdeFrame getFrame()
public void setFrame(JOdeFrame newFrame)
newFrame
- The new Frame value.public java.applet.Applet getApplet()
public void setApplet(java.applet.Applet newApplet)
newApplet
- The new Applet value.public java.lang.String getTitle()
public void setTitle(java.lang.String newTitle)
newTitle
- The new Title value.public void quit()
quit
removes this JODe panel from the
applet and the frame and waits to be garbage-collected.public void startCalculation()
startCalculation
method initiates the
calculation corresponding to the current applet settings.public void stopCalculation()
stopCalculation
method stops any running
calculation.public static void main(java.lang.String[] args)
args
- Command line arguments.