static generateTransition(size, transitionFunc) {
        let buf = new Float64Array(size*size*2);
        for (let c = 0; c < size; c++) {
            let r = transitionFunc(c);
            let k = (r*size + c)*2;
            buf[k] = 1;
        }
        return new Matrix(size, size, buf);
    }
Returns a matrix of the given size, with each column being mapped to a row by the transition function.
@param {!int} size
@param {!function(!int): !int} transitionFunc
@returns {!Matrix}