Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.gcsc.vrl.commons.math.ode; import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.exception.MaxCountExceededException; import org.apache.commons.math3.ode.FirstOrderDifferentialEquations; /** * * @author Michael Hoffer <info@michaelhoffer.de> */ public class XSquareODE implements FirstOrderDifferentialEquations { @Override public int getDimension() { return 1; } @Override public void computeDerivatives(double t, double[] y, double[] yDot) throws MaxCountExceededException, DimensionMismatchException { yDot[0] = 2 * t; } }