Skip to content

Commit 3d0c8b3

Browse files
committed
Update MarkovProcess.jl
1 parent f36bad5 commit 3d0c8b3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/MarkovProcess.jl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,13 @@ state_space(X::DiffusionProcess) = X.x
6060
at the border of state space
6161
"""
6262
function generator(X::DiffusionProcess)
63-
n = length(X.x)
64-
𝕋 = Tridiagonal(zeros(n-1), zeros(n), zeros(n-1))
65-
generator!(𝕋, X.x, X.μx, X.σx)
63+
generator(X.x, X.μx, X.σx)
6664
end
6765

6866
function generator(x::AbstractVector, μx::AbstractVector, σx::AbstractVector)
69-
generator!(T, x, μx, σx)
70-
end
71-
72-
function generator!(𝕋, x::AbstractVector, μx::AbstractVector, σx::AbstractVector)
7367
# if you use this form, make sure that 𝕋 only has zero
7468
n = length(x)
75-
fill!(𝕋, 0)
69+
𝕋 = Tridiagonal(zeros(n-1), zeros(n), zeros(n-1))
7670
@inbounds for i in 1:n
7771
Δxp = x[min(i, n-1)+1] - x[min(i, n-1)]
7872
Δxm = x[max(i-1, 1) + 1] - x[max(i-1, 1)]

0 commit comments

Comments
 (0)