import { Equation, Step } from './types.js'; /** * Represents basic functions for a differential equation. */ export declare class DifferentialEquationBase { private readonly dnx; /** * The highest derivative order of this differential equation */ private readonly order; /** * Stores information for this differential equation */ private readonly data; /** * Current state vector used to evaluate the derivative equation */ private state; /** * Create a new differential equation. * @param dnx The formula for `d(n)x/dt(n)` where `n` is the highest order * @param x0 Initial conditions for all `n-1` derivative orders ordered by `x`, `dx/dt`, `d2x/dt2`, ..., `d(n-1)x/dt(n-1)` */ constructor(dnx: Equation, ...x0: number[]); /** * Calculate `x` and all its derivatives after a timestep `dt`. * @param dt The timestep */ step(dt: number): void; /** * Set the global state vector used by `d(n)x/dt(n)` in the next timestep, such as `x`, `dx/dt`, ..., `d(n-1)x/dt(n-1)`. * @param x State values used in `d(n)x/dt(n)` */ setState(...x: number[]): void; /** * Get the current state vector for this equation at time `t`, ordered from lowest derivative to highest order, excluding order `n`. * @returns `x`, `dx/dt`, ..., `d(n-1)x/dt(n-1)` */ getState(): number[]; /** * Get the current time of the solution. * @returns The current time `t` */ getTime(): number; /** * Get all data for this differential equation. * @returns An array containing each timestamp and all derivatives evaluated at that timestamp */ getData(): Step[]; }