/*global require, module, $, jQuery*/

module.exports = {
    uuid: function(){
        var uuid = "", i, random;
        for (i = 0; i < 32; i++) {
            random = Math.random() * 16 | 0;

            if (i == 8 || i == 12 || i == 16 || i == 20) {
                uuid += "-";
            }
            uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16);
        }
        return uuid;
    }
};

@@ -409,16 +409,1582 @@
 n uuid;%0A
+    %7D,%0A    rk4: function(t0, x0, integrand, t1, h)%7B%0A        var x = x0;%0A        var t = t0;%0A%0A        if(typeof h == %22undefined%22)h = 1e-3;%0A%0A        function add()%7B%0A            return %5B%5D.reduce.call(arguments, function(prev, curr)%7B%0A                return $.map(curr, function(val, i)%7B%0A                    return val + prev%5Bi%5D;%0A                %7D);%0A            %7D);%0A        %7D%0A%0A        function mul_c(c, vec)%7B%0A            return $.map(vec, function(val)%7B%0A                return c*val;%0A            %7D);%0A        %7D%0A        %0A        while(t %3C t1)%7B%0A            var k1s = integrand(t, x);%0A            var k2s = integrand(t+h/2, add(x, mul_c(h/2, k1s)));%0A            var k3s = integrand(t+h/2, add(x, mul_c(h/2, k2s)));%0A            var k4s = integrand(t+h, add(x, mul_c(h, k3s)));%0A            x = add(x, mul_c(h/6, add(k1s, mul_c(2, k2s), mul_c(2, k3s), k4s)));%0A            t += h;%0A        %7D%0A        return x;%0A    %7D,%0A    euler: function(t0, x0, integrand, t1, h)%7B%0A        var x = x0;%0A        var t = t0;%0A%0A        if(typeof h == %22undefined%22)h = 1e-3;%0A%0A        while(t %3C t1)%7B%0A            var dx = integrand(t+h, x);%0A            x = $.map(x, function(val, i)%7B%0A                return val + h*dx%5Bi%5D;%0A            %7D);%0A            t+=h;%0A        %7D%0A%0A        return x;%0A    %7D,%0A    array: function(num, init)%7B%0A        if(typeof init == %22undefined%22)init = 0;%0A        var ret = new Array(num);%0A        for(var i=0; i%3Cnum; i++)ret%5Bi%5D = init;%0A        return ret;%0A    %7D,%0A    ret_t: function()%7B%0A        return true;%0A    %7D,%0A    ret_f: function()%7B%0A        return false;%0A    %7D,%0A    ret_no: function()%7B%0A
     %7D%0A%7D;

Implement two ODE solvers