static generate(width, height, coefficientRowColGenerator) {
        let buf = new Float64Array(width*height*2);
        for (let r = 0; r < height; r++) {
            for (let c = 0; c < width; c++) {
                let k = (r*width + c)*2;
                let v = coefficientRowColGenerator(r, c);
                buf[k] = Complex.realPartOf(v);
                buf[k+1] = Complex.imagPartOf(v);
            }
        }
        return new Matrix(width, height, buf);
    }
Returns a matrix of the given dimensions, using the given function to generate the coefficients.
@param {!int} width
@param {!int} height
@param {!function(row: !int, col: !int): (!number|!Complex)} coefficientRowColGenerator
@returns {!Matrix}