INNER CODE UNIT · JavaScript
x
lh3/pangene · pangene.js:232
x = Math.imul((x >> 16) ^ x, 0x45d9f3b) & 0xffffffff;
x = Math.imul((x >> 16) ^ x, 0x45d9f3b) & 0xffffffff;
return (x >> 16) ^ x;
}
#traverse_bubble(vs, ve, flag, f, max_n) {
let stack = [vs], list = [];
flag[vs] = f;
while (stack.length) {
const v = stack.pop();
const off = this.idx[v].o, n = this.idx[v].n;
for (let i = 0; i < n; ++i) {
const a = this.arc[off + i], w = a.w;
if (w == (vs^1)) continue; // don't pass the starting vertex on either strand
if (w == (ve^1)) return []; // if reaching the reverse complement of ve, there is no bubble
if (flag[w] != f) {
flag[w] = f;
if (w == ve) continue; // reaching the end vertex; flag it but don't add to list[] or stack[]
if (flag[w^1] != f) list.push(w>>1);