⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diffeqsolver.java

📁 一个一元曲线多项式数值演示例子
💻 JAVA
字号:
package numbercruncher.mathutils;

/**
 * The base class for differential equation solvers.
 */
public abstract class DiffEqSolver {
  /** the differential equation to solve */
  protected DifferentialEquation equation;

  /** the initial condition data point */
  protected DataPoint initialCondition;

  /** current x value */
  protected float x;
  /** current y value */
  protected float y;

  /**
   * Constructor.
   * @param equation the differential equation to solve
   */
  public DiffEqSolver(DifferentialEquation equation) {
    this.equation = equation;
    this.initialCondition = equation.getInitialCondition();

    reset();
  }

  /**
   * Reset x and y to the initial condition data point.
   */
  public void reset() {
    this.x = initialCondition.x;
    this.y = initialCondition.y;
  }

  /**
   * Return the next data point in the
   * approximation of the solution.
   * @param h the width of the interval
   */
  public abstract DataPoint nextPoint(float h);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -