#include #include #include using namespace matrix; // instantiate template to ensure coverage check template int integrate_rk4( Vector (*f)(float, Vector), const Vector & y0, float t0, float h, Vector & y1 ); Vector f(float t, Vector y); Vector f(float t, Vector y) { return ones(); } int main() { Vector y = ones(); float t = 1; float h = 0.1f; y.T().print(); integrate_rk4(f, y, 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 : */