INNER CODE UNIT · JavaScript
x
lh3/gfatools · js/gfa-plot.js:217
x = Math.imul((x >> 16) ^ x, 0x45d9f3b) & 0xffffffff;
x = Math.imul((x >> 16) ^ x, 0x45d9f3b) & 0xffffffff;
return (x >> 16) ^ x;
}
function gfa_walk_gen(g, merge, uniq) // filter or combine walks
{
var walk = [], tmp = [];
if (uniq) { // only choose samples with one walk
var t2 = g.walk.sort(function(x,y) { return x.asm == y.asm? 0 : x.asm < y.asm? -1 : 1 });
var i, i0;
for (i0 = 0, i = 1; i <= t2.length; ++i) {
if (i == t2.length || t2[i].asm != t2[i0].asm) {
if (i - i0 == 1) tmp.push(t2[i0]);
i0 = i;
}
}
} else { // choose all walks