SDEint.py
def itoEM(self, p, X, t, h, dW):
        """Euler-Maruyama method for Ito."""
        a = p.f(X, t)*h
        # print("X.shape, a.shape: ",X.shape,a.shape)
        for k in range(p.m):
            b1 = p.g[k](X, t)
            # print("b1.shape, dW[k].shape: ",b1.shape, dW[k].shape)
            a += b1*dW[k]
            #pri nt("dW, b1, b2, a",dW[k],b1,b2,a)
        c = X + a
        if self.printNum:
            print("dW: ",dW)
            print("t: ",t)
            print("X: ",X)
            print("a: ",a)
            print("b: ",b)
            print("c: ",c)
        return c
Euler-Maruyama method for Ito.
Euler-Maruyama method for Ito.
Euler - Maruyama method for Ito .
def itoEM(self, p, X, t, h, dW):
        a = p.f(X, t)*h
        for k in range(p.m):
            b1 = p.g[k](X, t)
            a += b1*dW[k]
        c = X + a
        if self.printNum:
            print("dW: ",dW)
            print("t: ",t)
            print("X: ",X)
            print("a: ",a)
            print("b: ",b)
            print("c: ",c)
        return c
def itoEM ( self , p , X , t , h , dW ) : a = p . f ( X , t ) * h for k in range ( p . m ) : b1 = p . g [ k ] ( X , t ) a += b1 * dW [ k ] c = X + a if self . printNum : print ( "dW: " , dW ) print ( "t: " , t ) print ( "X: " , X ) print ( "a: " , a ) print ( "b: " , b ) print ( "c: " , c ) return c
Euler-Maruyama method for Ito.
Euler - Maruyama method for Ito .
"""Euler-Maruyama method for Ito.""" # print("X.shape, a.shape: ",X.shape,a.shape)
 # print("b1.shape, dW[k].shape: ",b1.shape, dW[k].shape)
 #pri nt("dW, b1, b2, a",dW[k],b1,b2,a)

self
p
X
t
h
dW