INNER CODE UNIT · JavaScript

t1

lh3/pangene · pangene.js:524

					let t1 = w.v[0], t2 = w.v[w.v.length-1]^1;
					if (f[t1] == 0) f[t1] = 2;
					if (f[t2] == 0) f[t2] = 2;
				}
				for (let v = 0; v < n_vtx; ++v)
					if (f[v] == 2)
						tip.push(v);
			}
			// add super node
			if (tip.length > 0) {
				const super_node = this.n_node++;
				let seg_id = g.seg.length;
				for (const v of tip) {
					this.arc.push({ v:super_node, w:this.end_cat[v], seg:seg_id, ori:1,  pair:-1, cec:-1, dfs_type:0 });
					this.arc.push({ v:this.end_cat[v], w:super_node, seg:seg_id, ori:-1, pair:-1, cec:-1, dfs_type:0 });
					++seg_id;
				}
			}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…