INNER CODE UNIT · JavaScript
d
lh3/pangene · pangene.js:698
const d = new BackEdgeNode(-1); // capping back edge
blist.push(d);
vs[w].be_end_cap.push(d);
}
vs[v].blist = blist;
if (0) this.#dbg_blist(blist);
// determine the category for tree edge (parent(v),v)
if (this.dfs_par[v] >= 0) { // not a root (there may be multiple roots if the graph is disconnected)
const u = this.dfs_par[v]; // v's parent
const n = this.idx[u].n, off = this.idx[u].o;
let e = -1; // the tree edge from u to v
for (let i = 0; i < n; ++i)
if (this.arc[off + i].w === v && this.arc[off + i].dfs_type === 1)
e = off + i;
if (e < 0) throw Error(`Bug: failed to find tree edge ${u}->${v}`);
if (blist.size > 0) {
const b = blist.tail;