arnaucube
arnaucube/circomlibPublic Self-hosted repository
circomlib/src/poseidon_printmatrix.js
src/poseidon_printmatrix.jsRaw
 1
 2
 3const Poseidon = require("./poseidon.js");
 4
 5const M = Poseidon.getMatrix();
 6
 7let S = "[\n    ";
 8
 9for (let i=0; i<M.length; i++) {
10    const LC = M[i];
11    S = S + "[\n";
12    for (let j=0; j<LC.length; j++) {
13        S = S + "        " + M[i][j].toString();
14        if (j<LC.length-1) S = S + ",";
15        S = S + "\n";
16    }
17    S = S + "    ]";
18    if (i<M.length-1) S = S + ",";
19}
20S=S+ "\n]\n";
21
22console.log(S);