differentialequation.java
来自「一个一元曲线多项式数值演示例子」· Java 代码 · 共 62 行
JAVA
62 行
package numbercruncher.mathutils;
/**
* The base class for functions that can have derivatives.
* Initialize the static function table with some sample functions.
*/
public abstract class DifferentialEquation
implements Evaluatable {
/** initial condition */
private DataPoint initialCondition;
/** solution function label */
private String solutionLabel;
/**
* Constructor.
* @param initialCondition the initial condition data point
* @param solutionLabel the solution function label
*/
public DifferentialEquation(DataPoint initialCondition,
String solutionLabel) {
this.initialCondition = initialCondition;
this.solutionLabel = solutionLabel;
}
/**
* Return the initial condition data point.
* @return the initial condition
*/
public DataPoint getInitialCondition() {
return initialCondition;
}
/**
* Return the solution label.
* @return the label
*/
public String getSolutionLabel() {
return solutionLabel;
}
/**
* Return the value of the differential equation at x.
* (Implementation of Evaluatable.)
* @param x the value of x
* @return the solution value
*/
public abstract float at(float x);
/**
* Return the value of the differential equation at (x, y).
* @return the solution value
*/
public float at(float x, float y) {
return at(x);
}
/**
* Return the value of the solution at x.
* @return the solution value
*/
public abstract float solutionAt(float x);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?