Handbook
Glossary
(runge-kutta-4) ( dx..n/dt delta tx..n -- tx..n' )
Vocabulary
math
.
runge-kutta
Inputs
dx..n/dt
an
object
delta
an
object
tx..n
an
object
Outputs
tx..n'
an
object
Definition
USING:
accessors
arrays
combinators
kernel
math.vectors
sequences
;
IN:
math.runge-kutta
:
(runge-kutta-4)
( dx..n/dt delta tx..n -- tx..n' )
[
runge-kutta-transforms
[
[
dup
]
compose
]
map
[
]
[
compose
]
reduce
( -- rk1 rk2 rk3 rk4 rk4 )
call-effect
drop
4array
dup
first
length>>
0
<array>
[
v+
]
reduce
1/6
v*n
]
2keep
increment-time
increment-state-by-approximation
;