m × n matrix to fill
vector of progression coefficients length of m
import mir.ndslice.slice: sliced; import mir.ndslice.allocation: uninitSlice; auto x = [1.0, 2, 3, 4, 5].sliced; auto v = uninitSlice!double(x.length, x.length); v.fillVandermonde(x); assert(v == [[ 1.0, 1, 1, 1, 1], [ 1.0, 2, 4, 8, 16], [ 1.0, 3, 9, 27, 81], [ 1.0, 4, 16, 64, 256], [ 1.0, 5, 25, 125, 625]]);
Fills a matrix with the terms of a geometric progression in each row.