Results 1 to 5 of 5
  1. #1
    ankit1801 is offline Member
    Join Date
    Mar 2011
    Posts
    20
    Rep Power
    0

    Exclamation 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?

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,354
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by ankit1801 View Post
    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?
    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,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    ankit1801 is offline Member
    Join Date
    Mar 2011
    Posts
    20
    Rep Power
    0

    Default

    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

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,354
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by ankit1801 View Post
    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
    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,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    ankit1801 is offline Member
    Join Date
    Mar 2011
    Posts
    20
    Rep Power
    0

    Default

    and how do i create the other graph showing ractants and products which are connected by lines?
    i read something about JGraphT. can i use it? how to install it?
    or is there any other way to show the interactions?

Similar Threads

  1. Replies: 1
    Last Post: 11-02-2009, 10:39 PM
  2. Replies: 2
    Last Post: 04-14-2009, 10:01 PM
  3. nodes in java netowork
    By ahsan in forum Advanced Java
    Replies: 0
    Last Post: 12-26-2007, 03:11 PM
  4. nodes in java
    By ahsan in forum New To Java
    Replies: 0
    Last Post: 12-26-2007, 03:09 PM
  5. Rectangle with rounded edges??
    By orchid in forum Java 2D
    Replies: 1
    Last Post: 05-10-2007, 02:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •