Computes the arithmetic mean of a strided array using pairwise summation.
number of indexed elements
input array
stride length
arithmetic mean
var x = [ 1.0, -2.0, 2.0 ];
var v = meanpw( x.length, x, 1 );
// returns ~0.3333
Computes the arithmetic mean of a strided array using pairwise summation and alternative indexing semantics.
number of indexed elements
input array
stride length
starting index
arithmetic mean
var x = [ 1.0, -2.0, 2.0 ];
var v = meanpw.ndarray( x.length, x, 1, 0 );
// returns ~0.3333
Interface describing
meanpw
.