chickadee » math-utils » subvector-reduce

subvector-reduce FUNC VEC #!optional WIDTH OVERLAY START ENDprocedure

Returns a vector from the application of FUNC to every set of sequential WIOTH elements in VEC; the subinterval. Should the VEC have a non-integer number of subinterval the remainder is treated a vector with WIDTH the remaining length. It is up to the caller to ensure an integral subinterval count.

FUNC
('b #!optional 'b -> 'a) ; .
VEC
(vector-of 'b ; vector to reduce.
WIDTH
fixnum ; subinterval width, default 2.
OVERLAY
fixnum ; subinterval shift, default WIDTH.
START
fixnum ; start index of VEC, default 0.
END
fixnum ; end index of VEC, default (vector-length VEC).