BridgesUNCC / bridges-java

JAVA Client library for Bridges
http://bridgesuncc.github.io
GNU General Public License v2.0
4 stars 12 forks source link

Circular list. #103

Closed krs-world closed 6 years ago

krs-world commented 7 years ago

Circular lists with just a single node doesnd draw the link to itself in the visualization. . Here is the JSON.

{"name": "edu.uncc.cs.bridges","version": "0.4.0","visual": "CircularSinglyLinkedList","title": "A Trivial Circular Singly Linked List Example","description": "","nodes": [{"name":"Example","shape":"circle","size":10.0,"color":[255,0,0,1.0]}],"links": [{"color":[70,130,180,1.0],"thickness":1.0,"name":1.0,"source":0,"target":0}]}

The visualization should correctly show the link to itself, as it is in the data structure.

squeetus commented 7 years ago

At some point in the near future, I will update the linked node representation so that each node contains explicit attributes for next/prev incoming/outgoing links. These positions will vary based on the size and shape of the node, but will give us attributes we can directly access when drawing links to and from nodes (rather than drawing multiple svg elements for each node).

That should address this particular issue, but we might need to augment the JSON to include redundant links and to indicate which node location they attach to. I'll post back on this issue once I've had some time to think about it and play with the various options.

Longterm, this will make our lives much easier creating dynamic, interactive linked list visualizations in both nodelink and classic styles.

krs-world commented 7 years ago

We can stick with the node link representation for now for lists. But yeah, its important for the visualization to be in sync with the data structure. This seems to be an issue with the circular list. The other data structures are not impacted as far as I can tell.

So am I to understand that the default node-link visualization will not allow more than 1 link between the same pair of nodes? I was hopint it might.. but yeah, having positions to lock onto would be good.

 -- krs

On 6/12/17 6:10 PM, David Burlinson wrote:

At some point in the near future, I will update the linked node representation so that each node contains explicit attributes for next/prev incoming/outgoing links. These positions will vary based on the size and shape of the node, but will give us attributes we can directly access when drawing links to and from nodes (rather than drawing multiple svg elements for each node).

That should address this particular issue, but we might need to augment the JSON to include redundant links and to indicate which node location they attach to. I'll post back on this issue once I've had some time to think about it and play with the various options.

Longterm, this will make our lives much easier creating dynamic, interactive linked list visualizations in both nodelink and classic styles.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/krs-world/bridges/issues/103#issuecomment-307948674, or mute the thread https://github.com/notifications/unsubscribe-auth/AFZSONmQ--MOsvpG_2S8FSGSqay9GO21ks5sDbdsgaJpZM4N2OsG.

-- Kalpathi Subramanian Ph: 704 687 8579 Associate Professor Email: krs@uncc.edu Dept of Computer Science Web:http://webpages.uncc.edu/krs The University of North Carolina Charlotte, NC 28202-0001

krs-world commented 7 years ago

ps. I mean, it has an issue only with some of the trivial cases, so clearly we dont want to spend a ton of time on this and can easily compromize. We have to do tha AWS transition for Mongo, etc, which are more important.

 -- krs

On 6/12/17 6:10 PM, David Burlinson wrote:

At some point in the near future, I will update the linked node representation so that each node contains explicit attributes for next/prev incoming/outgoing links. These positions will vary based on the size and shape of the node, but will give us attributes we can directly access when drawing links to and from nodes (rather than drawing multiple svg elements for each node).

That should address this particular issue, but we might need to augment the JSON to include redundant links and to indicate which node location they attach to. I'll post back on this issue once I've had some time to think about it and play with the various options.

Longterm, this will make our lives much easier creating dynamic, interactive linked list visualizations in both nodelink and classic styles.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/krs-world/bridges/issues/103#issuecomment-307948674, or mute the thread https://github.com/notifications/unsubscribe-auth/AFZSONmQ--MOsvpG_2S8FSGSqay9GO21ks5sDbdsgaJpZM4N2OsG.

-- Kalpathi Subramanian Ph: 704 687 8579 Associate Professor Email: krs@uncc.edu Dept of Computer Science Web:http://webpages.uncc.edu/krs The University of North Carolina Charlotte, NC 28202-0001