Results 1 to 1 of 1
Thread: Graph program code,hardnut
- 03-24-2008, 04:25 PM #1Member
- Join Date
- Mar 2008
- Rep Power
Graph program code,hardnut
Im workin on a program that reads a list from the table of 2 columns(text format).Iv created an interface that reads the table which is a linked list(the elemenst opposite to each other in thetable are said to have a link) and stores the values in the 2 dimensional arrays.The next step is to
1 )Count the number of times an element has occured on both sides of the table.i.e. how many links it has .any one know how to do that?
2 )Make an internal table that relabels te elements in the desecending order of number of times it has repeated(number of links it has).The element with the most links is labeled 1 and the element with the least number of links is labelled the last.
3 )All the elements linked to eachother are neighbours.If more than 1 element have the same number of links then they are sorted in descending order of their neighbours number of links(checking from the table above),comparing neighbours with the highest number of links,if thats the same then neighbours with 2nd largest number of links,until all neighbours have been compared.Incase the number of links for an element is still the same,the sort order does not matter.
4 )Finally when all the elements have been relabelled,the new labels will be put onto the initial table of links.
5 )The table will then be graphed with elements in the 1st column(x axis) against elements in the 2nd column(y axis).For each link therel be a dot both(x,y) and(y,x) wise.
If anyone can solve all or part of this ,il be thankful.More details can be provided if you dont understand any part.
- By chitwood in forum New To JavaReplies: 4Last Post: 10-13-2010, 02:21 PM
- By BHCluster in forum Java 2DReplies: 5Last Post: 04-15-2008, 03:54 PM
- By Kreuz14 in forum New To JavaReplies: 4Last Post: 01-23-2008, 04:27 AM
- By fakhruddin in forum AWT / SwingReplies: 1Last Post: 11-27-2007, 09:54 PM
- By silvia in forum Java 2DReplies: 1Last Post: 07-29-2007, 11:16 PM