#include #include #include using namespace matrix; Vector f(float t, const Matrix & y, const Matrix & u); Vector f(float t, const Matrix & y, const Matrix & u) { return ones(); } int main() { Vector y = ones(); Vector u = ones(); float t = 1; float h = 0.1f; y.T().print(); integrate_rk4(f, y, u, t, h, y); y.T().print(); assert(y == (ones()*1.1f)); return 0; } /* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */