Handbook
Glossary
runge-kutta-stages ( dt: float dx..n/dt: array x..nt: array -- k-seq: vector )
Vocabulary
math
.
runge-kutta
Inputs
dt
a
float
dx..n/dt
an
array
x..nt
an
array
Outputs
k-seq
a
vector
Definition
USING:
combinators
kernel
math.vectors
sequences
typed
vectors
;
IN:
math.runge-kutta
TYPED::
runge-kutta-stages
( dt: float dx..n/dt: array x..nt: array -- k-seq: vector )
butcher-tableau
vector
new
1vector
[
[
dt x..nt
runge-kutta-stage-n
dx..n/dt
[
( x -- x )
call-effect
]
with
map
dt
v*n
]
[
drop
swap
suffix
]
2bi
]
accumulate*
last
rest
;