This commit is contained in:
biglyderv 2025-01-30 10:14:23 -05:00
parent 767d1c2943
commit bef8c0756e

View file

@ -41,12 +41,14 @@ function rankCalc(result, iterations = 10) {
pr = [];
matrixe = [];
let msum = 1;
let intv = Math.pow(1/1000,Math.pow(0.25, i / Math.sqrt(mm)));
console.log(`Completed ${i} iterations with ${intv} threshold`)
for (let una in result) {
pr[una] = 0;
matrixe[una] = [];
if (frs[una].length == 0) {
matrixe[una] = structuredClone(matrixf[una]); // probably not efficient
matrixe[una] = matrixf[una];
continue;
}
@ -54,7 +56,7 @@ function rankCalc(result, iterations = 10) {
let prb = prold[unb];
matrixe[una][unb] = 0.03;
if (prb < (i+1) / (mm + 1) || fnc[unb] == 0) {
if (prb < intv || fnc[unb] == 0) {
continue;
}
@ -81,8 +83,6 @@ function rankCalc(result, iterations = 10) {
for (let unn in result) {
pr[unn] /= new_sum;
}
console.log(`Iteration ${i} calculated`);
}
return pr;