#include #include #include using namespace matrix; // instantiate template to ensure coverage check template int integrate_rk4( Vector (*f)(float, Vector), Vector & y, float & t, float h ); Vector f(float t, Vector y); Vector f(float t, Vector y) { return ones(); } int main() { Vector y = ones(); float h = 1; float t = 1; y.T().print(); integrate_rk4(f, y, t, h); y.T().print(); assert(y == (ones()*2)); return 0; } /* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */