Results 1 to 5 of 5
Thread: creating nodes and edges in java
- 03-18-2011, 06:19 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 20
- Rep Power
- 0
creating nodes and edges in java
i have 3 ArrayLists namely reactants, products and modifiers. i need to show a network connecting reactants to products via modifiers. i am new to java. how do i represnt the network? how to display reactants, products and modifiers on the screen? how to connect them using arrowed lines?
- 03-18-2011, 06:48 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
Do I understand you correctly if I say that reactants and products are the vertexes of the graph while modifiers make up the edges of the graph? Is the graph bipartite, i.e. can you divide the vertexes of the graph is two sets? Here those sets would be the reactants and products while all edges 'move' from one set to the other. Correct me if I'm wrong please.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 03-18-2011, 12:18 PM #3
Member
- Join Date
- Mar 2011
- Posts
- 20
- Rep Power
- 0
i have to create a bipartite graph and also a normal network. in bipartite i have to connect the reactants to the modifiers and then modifiers to the product. (ie its a multi partite).
in the network, i need to show reactants and products as nodes connected by lines. it will be fine if modifiers are not included in this graph
- 03-18-2011, 12:27 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
That's easy: think of three vertical lines next to each other; the left line contains n points where the points are the vertexes representing the n reactants. The middle line contains m points where the points represent the m modifiers; the same goes for the line on the right: it contains the k products. Connect points from the first line to the second line and the same from the second line to the third line; you decide which lines have to be drawn. You also decide how fancy you want to draw those points on those three vertical lines; obviously it isn't necessary to draw those three vertical lines.
kind regasrds,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 03-19-2011, 06:15 AM #5
Member
- Join Date
- Mar 2011
- Posts
- 20
- Rep Power
- 0
Similar Threads
-
Why doesn't the panel update unless I drag the edges?
By Addez in forum New To JavaReplies: 1Last Post: 11-02-2009, 10:39 PM -
Nodes and edges..making visible and invisible based on distance
By sfaiz in forum Java AppletsReplies: 2Last Post: 04-14-2009, 10:01 PM -
nodes in java netowork
By ahsan in forum Advanced JavaReplies: 0Last Post: 12-26-2007, 03:11 PM -
nodes in java
By ahsan in forum New To JavaReplies: 0Last Post: 12-26-2007, 03:09 PM -
Rectangle with rounded edges??
By orchid in forum Java 2DReplies: 1Last Post: 05-10-2007, 02:31 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks