Process an lvec in chunks
chunkwise(x, init, update, final, ...)
the lvec
.
initialisation function. This function should accept an
lvec
as its first argument and return an initial value
for the state.
update function. Called for each chunk of data. Receives the current value of the state as its first argument and the next chunk of data as its second argument. Should return an updated state. This function can be called multiple times.
finaliser function. Is called after processing the complete lvec. Receives the final state as its first argument. Should return the end result.
optional arguments passed on to the supplied functions.