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

Use LinkedList for toBeVisited variable in src/Layout.js file #11

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

metincansiper
Copy link
Collaborator

I recognized that while porting this code from Java, we used a Javascript array instead of the LinkedList for the toBeVisited variable that is defined as a LinkedList here (https://github.com/iVis-at-Bilkent/chilay/blob/605e77732a6f06da2081e2d89a68084c1e508cdb/src/main/java/org/ivis/layout/Layout.java#L566) in original Java code. However, since there is a poll() operation performed on the toBeVisited variable here (https://github.com/iVis-at-Bilkent/chilay/blob/605e77732a6f06da2081e2d89a68084c1e508cdb/src/main/java/org/ivis/layout/Layout.java#L584) using an array must decrease the performance. I think that while porting the code, we used the array there just as a result of a little confusion.

This PR updates the code to define and use toBeVisited variable as a LinkedList instead of the array. I recognized that in the past a similar fix/update has been done in this commit (cytoscape/cytoscape.js-cose-bilkent@a158455) as well.

Important Note
I had issue in running npm install. Therefore, I could not test the changes in this PR. It may need to be tested before being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants