Skip to content

Commit

Permalink
Update parent-dummy-chains.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitPaul0007 authored Sep 10, 2023
1 parent 215449a commit 681dfba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/parent-dummy-chains.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = parentDummyChains;

function parentDummyChains(g) {
var postorderNums = postorder(g);
let postorderNums = postorder(g);

g.graph().dummyChains.forEach(v => {
var node = g.node(v);
var edgeObj = node.edgeObj;
var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
var path = pathData.path;
var lca = pathData.lca;
var pathIdx = 0;
var pathV = path[pathIdx];
var ascending = true;
let node = g.node(v);
let edgeObj = node.edgeObj;
let pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
let path = pathData.path;
let lca = pathData.lca;
let pathIdx = 0;
let pathV = path[pathIdx];
let ascending = true;

while (v !== edgeObj.w) {
node = g.node(v);
Expand Down

0 comments on commit 681dfba

Please sign in to comment.