Skip to content

Commit

Permalink
changed algorithm to work with !==
Browse files Browse the repository at this point in the history
  • Loading branch information
tmhglnd committed Nov 20, 2021
1 parent 31442f7 commit f220a9e
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 35 deletions.
59 changes: 57 additions & 2 deletions build/ts.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 25 additions & 3 deletions build/ts.es5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/ts.es5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/gen-complex.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function fastEuclid(s=8, h=4, r=0){

for (let i=0; i<s; i++){
let v = Math.floor(i * (h / s));
arr[i] = v - d;
arr[i] = Number(v !== d);
d = v;
}
if (r){
Expand Down
28 changes: 0 additions & 28 deletions test/serialism.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,6 @@ console.log();
// markov.clear();
// console.log(markov.table);

// for (let i=0; i<100; i++){
// for (let j=1; j<i; j++){
// let e1 = Algo.euclid(i, j);
// let e2 = Algo.fastEuclid(i, j);

// let eq = false;
// for (let k=-e2.length; k<e2.length+1; k++){
// let r2 = Mod.rotate(e2, k);

// eq = Stat.compare(e1, r2);
// if (eq){
// break;
// }
// }
// for (let k=-e2.length; k<e2.length+1; k++){
// let r3 = Mod.rotate(Mod.reverse(e2), k);

// eq = Stat.compare(e1, r3);
// if (eq){
// break;
// }
// }
// if (!eq){
// console.log(i, j, eq);
// }
// }
// }

fullTest();

function fullTest(){
Expand Down

0 comments on commit f220a9e

Please sign in to comment.