Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update parent-dummy-chains.js #401

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading